Added Go Module support. This will not harm exisisting users such as those still using $GOPATH or other dependency managers such as go dep.
Using the new go module's "replace" concept is a great way to develop code on other repositories locally without having to push to my own fork or use vendoring. I can simply maintain a fork, point to it locally (in my project's go.mod) by placing the following in my own go.mod:
I realize there is an Open PR for go dep support, but from what I can tell go dep is still an evolving external standard. I don't see a huge reason to not support both (but I also don't use go dep, go modules give me everything I want, so maybe I'm biased)
Notes on the go mod commands to produce this PR (if you'd like to try it out):
$ go version
1.11+
$ cd /path/to/hc
$ unset GOPATH
$ go mod init github.com/brutella/hc
$ go get -v
Added Go Module support. This will not harm exisisting users such as those still using
$GOPATH
or other dependency managers such asgo dep
.Using the new go module's "replace" concept is a great way to develop code on other repositories locally without having to push to my own fork or use vendoring. I can simply maintain a fork, point to it locally (in my project's go.mod) by placing the following in my own
go.mod
:but without a
go.mod
inhc
you get the following error:Also note: https://github.com/golang/go/wiki/Modules#should-i-commit-my-gosum-file-as-well-as-my-gomod-file
Notes on
go dep
I realize there is an Open PR for go dep support, but from what I can tell go dep is still an evolving external standard. I don't see a huge reason to not support both (but I also don't use
go dep
,go modules
give me everything I want, so maybe I'm biased)Notes on the
go mod
commands to produce this PR (if you'd like to try it out):That's it.