1
0
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:
chavacava
2025-02-19 14:30:29 +01:00
committed by GitHub
parent a4ee892836
commit 4f342352f0
4 changed files with 42 additions and 10 deletions

View File

@@ -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/
}