mirror of
https://github.com/mgechev/revive.git
synced 2025-11-23 22:04:49 +02:00
feature: add suport of mapstructure struct tags in struct-tag rule (#1241)
This commit is contained in:
5
testdata/struct_tag.go
vendored
5
testdata/struct_tag.go
vendored
@@ -141,3 +141,8 @@ type Fields struct {
|
||||
Field string `datastore:",noindex,flatten,omitempty"`
|
||||
OtherField string `datastore:",unknownOption"` // MATCH /unknown option 'unknownOption' in Datastore tag/
|
||||
}
|
||||
|
||||
type MapStruct struct {
|
||||
Field1 string `mapstructure:",squash,reminder,omitempty"`
|
||||
OtherField string `mapstructure:",unknownOption"` // MATCH /unknown option 'unknownOption' in Mapstructure tag/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user