雑なメモ書き

気楽にいきます

go-fmtはバージョンによって微妙に差がある

golang.org

goにはgfmtというコマンドがいて、これを使用すると特定のフォーマットを強制出来るのですが、どうもバージョンアップごとに強制されるフォーマットが微妙に違う用です。

golang.org

Note that these kinds of minor updates to gofmt are expected from time to time. In general, systems that need consistent formatting of Go source code should use a specific version of the gofmt binary. See the go/format package documentation for more information.

なので、ここに書かれているようにチーム開発等をする場合は、特定バージョンのバイナリを使用することが望ましい。