Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 template 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. This can be left empty if the project doesn't have any need for the capability.
- Loading branch information