These bugs still need to be fixed. I wasn't sure about the correct way to fix them. It looks like a copypasta error in the struct tags, but I'll leave it to you
tests/ff.go:2261: struct field Y repeats json tag "Name" also at tests/ff.go:2260
tests/ff.go:2263: struct field tag `json",omitempty"` not compatible with reflect.StructTag.Get: bad syntax for struct tag pair
tests/ff.go:2264: struct field A repeats json tag "Name" also at tests/ff.go:2260
tests/ff.go:2270: struct field Y repeats json tag "Name" also at tests/ff.go:2269
tests/ff.go:2272: struct field tag `json",omitempty"` not compatible with reflect.StructTag.Get: bad syntax for struct tag pair
tests/ff.go:2273: struct field A repeats json tag "Name" also at tests/ff.go:2269
Here's the rest of the code that go vet doesn't like.
// TDominantField struct
// ffjson: skip
type TDominantField struct {
X *int `json:"Name,omitempty"`
Y *int `json:"Name,omitempty"`
Other string
Name *int `json",omitempty"`
A *struct{ X int } `json:"Name,omitempty"`
}
// XDominantField struct
type XDominantField struct {
X *int `json:"Name,omitempty"`
Y *int `json:"Name,omitempty"`
Other string
Name *int `json",omitempty"`
A *struct
}
go vet ./...
These bugs still need to be fixed. I wasn't sure about the correct way to fix them. It looks like a copypasta error in the struct tags, but I'll leave it to you
Here's the rest of the code that
go vet
doesn't like.https://github.com/pquerna/ffjson/tree/master/tests/ff.go#L2259-L2274
If this PR is merged, and the struct tag issue is fixed, we should enable
go vet
in.travis.yml
.