Last active
August 21, 2024 21:13
-
-
Save dlisboa/aae2a50532e2d566dff1b1d2dd30691c to your computer and use it in GitHub Desktop.
Using a tools.go mod for dev dependencies
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
| module diogo.li/camelot/tools | |
| go 1.22.5 | |
| require ( | |
| github.com/cespare/reflex v0.3.1 | |
| github.com/golangci/golangci-lint v1.60.2 | |
| ) | |
| // -- DO NOT COPY -- | |
| // all the indirect dependencies of the packages above |
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
| default: | |
| just --list | |
| export GOBIN := `echo $PWD/bin` | |
| @devsetup: | |
| echo "installing dev dependencies at $GOBIN ..." | |
| go install -C ./tools github.com/golangci/golangci-lint/cmd/golangci-lint | |
| go install -C ./tools github.com/cespare/reflex | |
| # ou assim: | |
| # setup all dev stuff | |
| @devsetup2 $GOBIN=`echo $PWD/bin`: | |
| cat ./tools/tools.go | grep _ | awk -F'"' '{print $2}' | xargs go install -C ./tools | |
| # ou dá para listar assim: | |
| # go list -C tools -e -f '{{join .Imports "\n"}}' |
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
| package tools | |
| import ( | |
| _ "github.com/cespare/reflex" | |
| _ "github.com/golangci/golangci-lint/cmd/golangci-lint" | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment