Created
May 28, 2025 17:41
-
-
Save vyorkin/959d17b2e283b20235d8fed78a379d26 to your computer and use it in GitHub Desktop.
Go Justfile (go.tool.mod)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TOOL_MODFILE := "go.tool.mod" | |
audit: | |
go vet ./... | |
go tool -modfile={{TOOL_MODFILE}} staticcheck ./... | |
go tool -modfile={{TOOL_MODFILE}} govulncheck | |
tool-add TOOL: | |
go get -tool -modfile={{TOOL_MODFILE}} {{TOOL}} | |
tool-run TOOL ARGS="": | |
go tool -modfile={{TOOL_MODFILE}} {{TOOL}} {{ARGS}} | |
tool-upgrade TOOL VERSION="": | |
#!/usr/bin/env bash | |
if [ "{{VERSION}}" != "" ]; then | |
go get -tool -modfile={{TOOL_MODFILE}} {{TOOL}}@{{VERSION}} | |
else | |
go get -tool -modfile={{TOOL_MODFILE}} {{TOOL}} | |
fi | |
tool-remove TOOL: | |
go get -tool -modfile={{TOOL_MODFILE}} {{TOOL}}@none |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment