![]() ![]() Install Sublime Text and GoSublime (or make sure you've got the latest update if it's already installed).Run go get -u /x/tools/cmd/goimports (you may have to install mercurial).Make sure $GOPATH/bin is in your $PATH (Windows: %GOPATH%\bin goes in your %PATH%).I’ve anxiously awaited this addition to GoSublime for a little while now. This tool can be invoked from GoSublime, a plugin for Sublime Text. I realize that the go authors had important reasons for this and I don't mean to start a flame war but I still wish that another tool (go vet?) did the job of warning us of extra stuff (imports, variables, etc.) being left around in the code and allow us to go on our merry (read: sloppy) way.īrad Fitz has come to our rescue by creating a tool that does everything go fmt does and it also helps with adding/removing imports: goimports. It bothers me to no end that the go compiler throws a fit when an extra import statement is left around. ![]() If you're already on the JetBrains bandwagon, just install GoLand and you're off to the races. JetBrains now has an IDE for Go (called GoLand) which resolves missing imports on the fly and will remove superfluous imports as well, all out-of-the-box. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |