nextmv Docs

Building And Testing

Building And Testing

Hop requires at least Go 1.13.

You should have the following environment variables set in your environment (~/.bashrc, ~/.zshrc or a similar configuration file). These settings allow Go to fetch Nextmv code directly from GitHub and ensures any Go tooling is available on your system path.

export PATH=$(go env GOPATH)/bin:$PATH

Go uses git to fetch source code from remote repositories. Because Nextmv products are source distributions in private repositories that require two factor authentication you must change your git config (usually ~/.gitconfig) to rewrite HTTPS URLs to use SSH.

[url ""]
insteadOf =

If you are using the source distribution, you can build and test from the hop/ directory with the go command.

go build ./...
go test ./...
ok 0.160s
ok 0.176s
ok 0.273s
ok 0.128s
ok 0.183s
ok 0.244s
ok 0.235s
ok 0.092s
ok 0.233s
ok 0.224s
ok 0.256s
ok 0.259s
ok 0.181s

Hop Releases

Like other Go modules, Hop uses semantic versioning. We tag releases from the stable branch and add updates to the change log. Once we tag a new release, you can use go get to require the new version of Hop in your own modules.

In this example replace <VERSION> with the semantic version you want to depend on (e.g. v0.2.3). Upgrading or downgrading your version of Hop works the same way.

go mod init
go get<VERSION>