I've my folder setup like this:
-src
--bitbucket.org
---eagleamulet
----myFirst.go (package main)
-----utils
------tempconv
-------tempconv.go (package tempconv)
However I'm not able to add the tempconv package to myFirst.go My Go environment settings look ok, so I'm not sure what's wrong here:
Any pointers are greatly appreciated!
thanks EA
Keep forgetting about qualifying the function names. It would have worked if I had done . to import into the current namespace.
All the packages imported are looked in under GOROOT and GOPATH environment variables first. Make sure your package is somewhere under these directories.
Now Suppose GOPATH is set to : /Users/test/Desktop/GoProject/src(lets assume, your src directory)
and GOROOT : /usr/local/go (where go is installed) . If a file(myFirst.go) in your GoProject has a package imported as
import "abc/def/packageName"
then it should be present at any of the below two places:
/Users/test/Desktop/GoProject/src/abc/def/packageName/* /usr/local/go/src/abc/def/packageName/*
If not, you will get import error.
The files inside these directories will have the first line as
package packageName
stating that all these files constitutes a package packageName