如何在golang使用自定义的包

2025-03-31 23:09:48
推荐回答(1个)
回答1:

例如你自定义的包在 %GOPATH%\custom\mypkg 你的包名也应该声明为 package mypkg 在其它包中 import "custom/mypkg"