On Wed, Dec 26, 2018, 3:07 PM Sam Whited <[email protected]> wrote: > This sounds like the version is mismatched. Is the gopath version a newer > commit (with api changes) than the tag being picked in the go.mod file? I > have this quite frequently with golang.org/x/text which was last released > some time ago and have to use a replace directive to get a more up to date > version and fix the build >
If I remember with Glide one could have it load the dependencies from the local GOPATH to avoid download. It would be kind of neat if until GOPATH were completely gone, that the go tool could have an option to init the Go.mod from the GOPATH. It would be similar to how it knows how to convert Glide and other dep management systems to module. Just a thought. > —Sam > > > On December 25, 2018 8:10:08 PM UTC, [email protected] wrote: > >I have been testing out the new go modules feature. Our application > >compiles/installs without problems using the normal $GOPATH way and > >have > >been using this for a while now. trying go modules produces the same > >error over and over > > > >Steps I followed > > > >unset $GOPATH just to be safe > > > >1) git clone github project > > > >2) go mod init > > > >3) go build > > > > > >and after some output where I can see it getting all the dependencies I > > > >keep getting > > > >random.go:14:10: assignment mismatch: 2 variables but 1 values > >random.go:29:10: assignment mismatch: 2 variables but 1 values > > > >Again reverting back to the normal $GOPATH way everything compiles fine > >and > >I can start the binary. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
