tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.55k stars 455 forks source link

i used gin, gin used +build #563

Open usernameisnull opened 5 years ago

usernameisnull commented 5 years ago

My project used gin, and in gin, you can use built in 'encoding/json' or 'jsoniter', my porject use 'encoding/json',so in $GOPATH/src,I don't have jsoniter,my gin works good when i use 'godep save ' my project,shows info: godep: Package (github.com/json-iterator/go) not found

I think there are a lot like this, because gin used govendor, when i entered gin' s source direcotry,use govender list,there are lots of missing, but i build success

m github.com/campoy/embedmd m github.com/client9/misspell/cmd/misspell m github.com/davecgh/go-spew/spew v1.1 v1.1.1 m github.com/dustin/go-broadcast m github.com/gin-gonic/autotls m github.com/jessevdk/go-assets m github.com/json-iterator/go v1.1 v1.1.5 m github.com/manucorporat/stats m github.com/stretchr/testify/assert v1.2 v1.2.2 m github.com/thinkerou/favicon m golang.org/x/lint/golint m golang.org/x/net/context m golang.org/x/sync/errgroup m google.golang.org/grpc m google.golang.org/grpc/reflection

When i 'godep save' may i exclude some,like in my case,exclude jsoniter?

usernameisnull commented 5 years ago

can you unserstand?my english sucks

usernameisnull commented 5 years ago

in https://github.com/gin-gonic/gin/blob/master/tools.go in https://github.com/gin-gonic/gin/blob/master/Makefile when you make tools, gin will install github.com/campoy/embedmd; in my project use go get install gin , will not install embedmd but in my project i just "go get -u github.com/gin-gonic/gin", would not install github.com/campoy/embedmd

when in my project i use godep save: godep: Package (github.com/campoy/embedmd) not found