あなたのコードに gofmt
を走らせると、自動的に機械的に直すことのできるスタイルの大部分を修正してくれます。
世にあるGolang コードのほとんどすべてが gofmt
を使っています。
この文章の残りは機械的に直すことのできないポイントについて解説します。
代わりに goimports
を使う手段もあります。
あなたのコードに gofmt
を走らせると、自動的に機械的に直すことのできるスタイルの大部分を修正してくれます。
世にあるGolang コードのほとんどすべてが gofmt
を使っています。
この文章の残りは機械的に直すことのできないポイントについて解説します。
代わりに goimports
を使う手段もあります。
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type Foo struct { | |
FirstName string `tag_name:"tag 1"` | |
LastName string `tag_name:"tag 2"` |