-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit c679381
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".1 parent 7ab3a17 commit c679381
1 file changed
+3
-0
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 | + | ||
43 | + | ||
42 | 44 |
| |
43 | 45 |
| |
44 | 46 |
| |
| |||
225 | 227 |
| |
226 | 228 |
| |
227 | 229 |
| |
230 | + | ||
228 | 231 |
| |
229 | 232 |
| |
230 | 233 |
| |
|
0 commit comments