goHike
goHike copied to clipboard
How to use it with dependencies?
My binary package have some dependencies installed from go get
command.
But i see it doesn't work after using deploy.sh
.
There are some errors like:
cannot find package github.com/robfig/cron (using -importcfg)
cannot find package github.com/go-chi/chi/middleware (using -importcfg)
@aaveidt Noted. Will reply you later.
@aaveidt Go support this feature now, see: https://golang.org/cmd/go/#hdr-Build_modes
The 'go build' and 'go install' commands take a -buildmode argument which indicates which kind of object file is to be built. Currently supported values are:
-buildmode=archive
Build the listed non-main packages into .a files. Packages named
main are ignored.
-buildmode=c-archive
Build the listed main package, plus all packages it imports,
into a C archive file. The only callable symbols will be those
functions exported using a cgo //export comment. Requires
exactly one main package to be listed.
-buildmode=c-shared
Build the listed main package, plus all packages it imports,
into a C shared library. The only callable symbols will
be those functions exported using a cgo //export comment.
Requires exactly one main package to be listed.
-buildmode=default
Listed main packages are built into executables and listed
non-main packages are built into .a files (the default
behavior).