英文:
Is it possible to embed a package without to copy it?
问题
我们有一个名为encoding/json的包。我是否可以创建一个名为mypackage的包,并将所有函数(至少是公共函数)嵌入到我的包中,而无需手动复制它们,并基本上调用实际的json包?我正在开发一个跨平台(Google应用引擎/本地)解决方案,我认为这样的解决方案非常有用。
英文:
Say there we have the package encoding/json. Can I just create a package mypackage and embed all the functions (at least the public functions) into my package without to copy them by hand and basically do calls back to the actual json package? I'm developing a cross platform (Google app engine / native ) solution and I would find a such solution quite useful.
答案1
得分: 0
不支持包继承这个功能。
英文:
No.
It sounds like you want some sort of package inheritance, this is not a supported feature.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论