TIL that Go’s formatter will be fine formatting a file with a composite literal for a slice, yet the Golang CI linter will complain about it and simply say the file is not fomatted:

// gofmt will be fine with this, but not golangci-lint
myValues := []myType{
  myType{ Foo: 1, Bar: 2 },
  myType{ Foo: 3, Bar: 5 },
}

So when you find you find yourself seeing a linter complain that a file that’s not formatted when it seems to be (maybe via an auto-format on save feature), try removing the redundant type name:

myValues := []myType{
 { Foo: 1, Bar: 2 },
 { Foo: 3, Bar: 5 },
}

Maybe this is what the -s switch of gofmt does (I haven’t checked). If so, I’m not sure why this switch is not set/available in go fmt.