Hi,
I have an existing project existing of a "library" creating a wrapper to "C" using "go install" and on a different place multiple "executable's" everything glue
together using the GOPATH technology. NOW I start using the new "module" technology.
Library:
- I create with "mod init pkgname" my module
- I build my library use both "go install" or "go build" and the build is done but NO final "pkg/*/pkgname.a" file is created → why?
- If I use "go build -o pkgname.a ." I get my "pkgname.a" and I can place it everywhere I want.
Executable:
- I create with "mod init example" a module in the directory using multiple "main" go files
- NOW I have the problem to refer my local library WITHOUT using the "GOPATH"
- In my "main" files I have "import (. pkgname ...)" but this does not works.
Expectation:
my expectation was that the library "pkgname" after build is available in the global module cache (because pkg/.../pkgname.a was NOT written :-) but
"go list all" has NOT my package
Question: HOW do I refer to my local module-package from an existing executable ?
→thanks for help.