go mod init example.com/my-golib-demoNote that you need to include the v in the version tag.
go get github.com/mitchallen/[email protected]package main
import (
"fmt"
"github.com/mitchallen/go-lib"
)
func main() {
fmt.Println(golib.Add(2,3))
fmt.Println(golib.Subtract(2,3))
}go testgit tag v0.1.0
git push origin --tags