Here is my problem and my project structure
src
|-->config
|--> config.go
|-->otherPackage
|--> otherFile.go
|-->main.go
You cannot "import from a package". All you can do is "import the whole package". That means if you import "full/import/path/of/foo"
and that package declared itself to be called foo via package foo
at the beginning, then everything in this package has to be qualified by foo
:
foo.Config
If you package is called config
than declaring a variable config
will shaddow the whole package: so you have to:
cfg
config.Config