Project on Google go, imports of libraries -
everyone.
i new go language , trying understand basics of building go applications. met following problem.
for example, using other libraries in project. have them locally, on computer, project works fine.
i loading code on github , programmer download it. understand, code won't work, because programmer doesn't have libraries used.
so question is: best way share project libraries has? should upload these libraries in separate repositories? use project, people need inside code detect libraries using download them 1 one?
for example, in java there such thing maven or ant, downloads required dependencies. there tools go?
let's call main file of project main.go , using own library: mathutil.go
what best way make project run on other computers?
go's dependencies work using maven or ivy transitive dependencies. when "go get" of package, depend on automatically download.
for example, in source:
import "github.com/foo/bar"
go automatically download $gopath/src/github.com/foo/bar along code.
assuming third party libs use hosted in public repo (ie: github) people don't need anything.
if libraries used not available on public repo, need post them somewhere assuming licensing allows.
take @ golang.org/doc/code.html more details
Comments
Post a Comment