no-image

File is not `goimports`-ed with -local github.com/xxx/xxx (goimports)

golangci-lint run ./...

実行時、

File is not `goimports`-ed with -local github.com/xxx/xxx (goimports)

というエラーが発生することがあったのでその対処法を紹介

以下のコマンドで一発で対処できる

goimports -local "github.com/xxx/xxx" -w .

-w オプションはファイルを直接書き換えるオプションなので、不要なら -w なしで実行すればOK