Developers interested in your module import a package from it and run the go get command just as they would with any other module. They can run the go get command for latest versions or they can specify a particular version, as in the following example:
$ go get firstname.lastname@example.org
Precede the command with a statement to set the GOPROXY environment variable to a Go proxy. This will ensure that your request reaches the proxy.
$ GOPROXY=proxy.golang.org go list -m email@example.com
Run go mod tidy, which removes any dependencies the module might have accumulated that are no longer necessary.
$ go mod tidy
This runs the unit tests you’ve written to use the Go testing framework.
$ go test ./... ok example.com/mymodule 0.015s
For the version number, use a number that signals to users the nature of changes in this release. For more, see Module version numbering.
$ git commit -m "mymodule: changes for v0.1.0" $ git tag v0.1.0
Push the new tag to the origin repository.
$ git push origin v0.1.0