You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go version
go version devel +bae1e70ac4 Thu Dec 6 20:13:40 2018 +0000 darwin/amd64
What did you do?
I ran go vet ./http and cd ./http; go vet . against github.com/influxdata/platform at revision 5da9d37b5b3d83056313ed5f6e50e529af52734e, master as of sometime today. (Of course, we should have fixed the vet error by now, but it has been helpful to work out some vet issues here, at least.)
$ mgotip vet ./http
# github.com/influxdata/platform/http
http/dashboard_service.go:86:2: struct field Cells repeats json tag "cells" also at dashboard.go:53
# It does in fact match ./dashboard.go line 53, but that isn't necessarily clear...
$ git ls-files | grep dashboard.go
bolt/dashboard.go
dashboard.go
inmem/dashboard.go
# Especially when your working directory does not have dashboard.go:
$ cd ./http
$ mgotip vet .
# github.com/influxdata/platform/http
./dashboard_service.go:86:2: struct field Cells repeats json tag "cells" also at dashboard.go:53
I expected the warning to use either an explicit relative path like ./dashboard.go:53 or ../dashboard.go:53; or a package-relative path like github.com/influxdata/platform/dashboard.go:53.
The text was updated successfully, but these errors were encountered:
Indeed a bug. This is because the check was extended to also check anonymous fields, whose type definition may be in a different package. So taking the file path basename is no longer enough to point to the relevant file.
Should be simple enough to fix, and it's a regression in 1.12 since the check was extended in the last few months. Will have a look this weekend.
This is a followup issue to #28995.
What version of Go are you using (
go version
)?What did you do?
I ran
go vet ./http
andcd ./http; go vet .
against github.com/influxdata/platform at revision 5da9d37b5b3d83056313ed5f6e50e529af52734e, master as of sometime today. (Of course, we should have fixed the vet error by now, but it has been helpful to work out some vet issues here, at least.)I expected the warning to use either an explicit relative path like
./dashboard.go:53
or../dashboard.go:53
; or a package-relative path likegithub.com/influxdata/platform/dashboard.go:53
.The text was updated successfully, but these errors were encountered: