上QQ阅读APP看书,第一时间看更新
Formatting with go fmt
The go fmt command is used to format source code files to meet Go formatting standards.
This will make sure that indentation is accurate and there are no excessive blank spaces, among other things. You can format a single Go source code file or a whole package at once. It is good practice to follow Go coding standards and run go fmt on your files so that you will have no doubt that your code follows the guidelines. Read more on formatting at https://golang.org/doc/effective_go.html#formatting.