go-sockaddr is used in HashiCorp core modules such as go-secure-stdlib/parseutil.
go-sockaddr Go module includes cmd/sockaddr which depends on modules used only for this CLI tool. Those features bring their own dependencies which are not needed by the core go-sockaddr functionality.
I propose to drop cmd/sockaddr/vendor and to create a separate Go module for cmd/sockaddr:
cd cmd/sockaddr
go mod init github.com/hashicorp/go-sockaddr/cmd/sockaddr
rm -Rf vendor
go get github.com/hashicorp/errwrap@v1.0.0
go get github.com/mitchellh/cli@v1.0.0
go get github.com/mitchellh/go-wordwrap@v1.0.0
go get github.com/ryanuber/columnize@v2.1.0+incompatible
go get github.com/hashicorp/go-sockaddr@v1.0.2
git add go.mod go.sum
cd ..
go mod tidy
git add go.mod go.sum
git commit -m "Create Go module for cmd/sockaddr"
git tag v1.0.3
git push --tags
cd cmd/sockaddr
go get github.com/hashicorp/go-sockaddr@v1.0.3
go mod tidy
git add go.mod go.sum
git commit
git tag cmd/go-sockaddr/v1.0.3
git push --tags
go-sockaddr
is used in HashiCorp core modules such asgo-secure-stdlib/parseutil
.go-sockaddr
Go module includescmd/sockaddr
which depends on modules used only for this CLI tool. Those features bring their own dependencies which are not needed by the corego-sockaddr
functionality.I propose to drop
cmd/sockaddr/vendor
and to create a separate Go module forcmd/sockaddr
: