Today I included 'go vet' in one of my pipelines that builds a go service. I wonder why go vet
's output on my local machine is different from the one that runs on the CI server.
I figured out that the go version differs - at least a bit. My local Go version is 1.12.4 and the CIs is version 1.12.7. This fact would explain the different behaviour, but I don't get why this happens!
There is the smell:
type Something struct {
...
BatteryNumber string `json:"number"`
...
}
type SomethingWithBattery struct {
Something
Number string `json:"number"`
...
}
So, two times 'number' in the struct tags, because Something-struct is nested SomethingWithBattery - 1.12.4 complains, 1.12.7 does not. Why?