go.mod ファイルのバージョン部分を手動ではなく、goコマンドで更新する。

module github.com/takecy/git-here

go 1.18  これ

require (
	github.com/fatih/color v1.13.0
	github.com/matryer/is v1.4.0
	github.com/pkg/errors v0.9.1
	golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0
)

更新手順

$ go mod edit -go=1.19
$ go mod tidy
module github.com/takecy/git-here

go 1.19  更新される

require (
	github.com/fatih/color v1.13.0
	github.com/matryer/is v1.4.0
	github.com/pkg/errors v0.9.1
	golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0
)

go mod tidy をしないとエラーが出る。