我該如何導入一個包?如何在Go中導入本地包?
的myproject
&NBSP&nbspmain.go
&NBSP&nbspRepository
&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP DBHelper.go
&NBSP&nbspConfiguration
&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP&NBSP Configuration.go
我需要從Configuration.go中調用DBHelper.go中的函數,我該怎麼做?
I need to call Select function from Configuration.go 謝謝!問候!
I Call Select but not working(undefined: DBHelper.Select in DBHelper)
導入路徑由它們相對於'$ GOPATH/src /'的目錄定義。請閱讀[「如何編寫Go代碼」](https://golang.org/doc/code.html)。它將解釋軟件包是如何工作的。 – JimB