Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use tools.go for managing Go tools via Go modules #180

Closed
10 tasks done
halyph opened this issue Nov 13, 2023 · 0 comments
Closed
10 tasks done

use tools.go for managing Go tools via Go modules #180

halyph opened this issue Nov 13, 2023 · 0 comments

Comments

@halyph
Copy link
Owner

halyph commented Nov 13, 2023

References

Main source of inspiration

Manage Go tools via Go modules

$ cat tools.go | grep _ | awk -F'"' '{print $2}' | xargs -tI % go install %

or

install-tools: download
@echo Installing tools from tools.go
@cat go list -f '{{range .Imports}}{{.}} {{end}}' tools.go | xargs go install

or

If you don't want to install the tools under $GOPATH/bin, you can do:

go list -f '{{range .Imports}}{{.}} {{end}}' tools.go | GOBIN=$(shell pwd)/bin xargs go install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant