Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/cmd/goimports: add -s flag #8759
I am not against it but gofmt (or go fmt) is not depending on anything but the std lib at the moment. Note that we are also considering removing that -r option from gofmt; so it may make sense to remove the -s option as well and have a separate tool instead. Not for 1.4 for sure.
Status changed to Thinking.
I forked the tools repository and added this behavior if anyone is interested:
I just copied the code from gofmt and removed the import comments: https://github.com/jzelinskie/tools/commit/348c54dbd0dc54b93cd91d71cfd483d55d00f971
If you're using vim-go you can add the following to your .vimrc to get both