You need to put each package in a separate sub-directory. So your directory structure so put lib.go in project/lib
and main.go in project/cmd
. It should then work.
solved How I can use local package in golang? [duplicate]
You need to put each package in a separate sub-directory. So your directory structure so put lib.go in project/lib
and main.go in project/cmd
. It should then work.
solved How I can use local package in golang? [duplicate]