-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed as duplicate of#71503
Labels
ProposalToolProposalIssues describing a requested change to a Go tool or command-line program.Issues describing a requested change to a Go tool or command-line program.
Milestone
Description
Proposal Details
Background
When using Go 1.24's tool dependency tracking with go get -tool to install the golang-migrate/migrate CLI, executing via go tool github.com/golang-migrate/migrate/v4/cmd/migrate resulted in a connection error. The root cause was a build constraint mismatch due to missing build tag specifications during invocation.
The migrate CLI requires explicit build tags (e.g., postgres, mysql) to conditionally compile database drivers. This works correctly when using go install with tags:
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latestBut go tool [tool name] command lacks explicit support for build tags (-tags) when invoked directly.
Expectation
Extend the go tool command to accept a -tags flag, propagating build tags to the underlying compilation process.
For example:
go tool -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrateMetadata
Metadata
Assignees
Labels
ProposalToolProposalIssues describing a requested change to a Go tool or command-line program.Issues describing a requested change to a Go tool or command-line program.