Created
April 8, 2024 02:13
-
-
Save smiley-yoyo/8bcbde72fd90bd6d5ae1ea5e79c9ff5e to your computer and use it in GitHub Desktop.
How to build generics-aware goimports as of 2021/12/07
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
| # In this script I'll use gotip, but there might be other ways | |
| go install golang.org/dl/gotip@latest | |
| # golang/go HEAD will be built | |
| gotip download | |
| # make sure gotip is available | |
| gotip version | |
| git clone https://github.com/golang/tools | |
| cd tools | |
| gotip install ./cmd/goimports/ | |
| # Now ~/go/bin/goimports (or somewhere else) can format Go code using generics! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment