如何在Go中导入本地包?

how can i do to import a package?

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

I need to call a function inside DBHelper.go from Configuration.go, how can i do it?

I need to call Select function from Configuration.go Thanks! Regards!

I Call Select but not working(undefined: DBHelper.Select in DBHelper)

Package imports are relative from your GOPATH

For example, if DBHelper.go uses package "helpers", your import would look like this:

<name of project folder>/Repository/helpers

Here is a very similar question on the subject: How to use custom packages in Go

--Edit

Almost forgot, to perform the actual function call, you must use the package name / alias.

helpers.MyFunc()