Skip to content

Commit 2300bda

Browse files
committed
Use standardized command in go:build task
This is the command used in the standardized "template" task that should be used in all Go projects. The previous `GO_BUILD_FLAGS` variable was intended to allow the developer to specify arbitrary arguments via the command line, but that is not needed. The `LDFLAGS` variable that is introduced here allows injecting data to the build, which is used in more complex applications, but not in this one at the moment.
1 parent 907dfbe commit 2300bda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tasks:
2626
go:build:
2727
desc: Build the Go code
2828
cmds:
29-
- go build -v {{.GO_BUILD_FLAGS}}
29+
- go build -v {{.LDFLAGS}}
3030

3131
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-task/Taskfile.yml
3232
go:test:

0 commit comments

Comments
 (0)