mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: manage tool versions in go.mod (#21455)
Go 1.24 adds [tool dependencies](https://go.dev/doc/modules/managing-dependencies#tools). This allows us to track versions of tools in our `go.mod` instead of sprinkling various `go run` commands throughout our codebase. NOTE: there are still various hard-coded `go install` commands in our dogfood Dockerfile. As that list is likely severely outdated, will leave that for a separate PR.
This commit is contained in:
@@ -18,7 +18,7 @@ trap cleanup EXIT
|
||||
log "Use temporary file: ${API_MD_TMP_FILE}"
|
||||
|
||||
pushd "${PROJECT_ROOT}"
|
||||
go run github.com/swaggo/swag/cmd/swag@v1.8.9 init \
|
||||
go tool github.com/swaggo/swag/cmd/swag init \
|
||||
--generalInfo="coderd.go" \
|
||||
--dir="./coderd,./codersdk,./enterprise/coderd,./enterprise/wsproxy/wsproxysdk" \
|
||||
--output="./coderd/apidoc" \
|
||||
|
||||
@@ -11,5 +11,5 @@ if [[ "$#" -lt 1 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
go run mvdan.cc/gofumpt@v0.8.0 -w -l "${@}"
|
||||
go run github.com/daixiang0/gci@v0.13.7 write -s standard -s default -s "Prefix(github.com/coder,cdr.dev/)" "${@}"
|
||||
go tool mvdan.cc/gofumpt -w -l "${@}"
|
||||
go tool github.com/daixiang0/gci write -s standard -s default -s "Prefix(github.com/coder,cdr.dev/)" "${@}"
|
||||
|
||||
Reference in New Issue
Block a user