You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add infrastructure for defining -ldflags for go test run
The `go:build` task has an `LDFLAGS` taskfile template variable, which is currently used by some projects to inject the
versioning information while building via an `-ldflags` flag.
`go test` has undocumented support for an `-ldflags` flag as well. Projects might find it useful to be able to set the
value of string variables in the code while running the tests. To provide support by the task for this use case, a
`TEST_LDFLAGS` taskfile template variable is added to the `go test` command in the `go:test` task, as well as empty
definition of the variable. Even though this project doesn't currently have any need for the capability, it does no harm
and brings the task into alignment with the standardized "template".
0 commit comments