|
| 1 | +package fixtures |
| 2 | + |
| 3 | +import "time" |
| 4 | + |
| 5 | +type RangeAllocation struct { |
| 6 | + metav1.TypeMeta `json:",inline"` |
| 7 | + metav1.ObjectMeta `json:"metadata,omitempty"` |
| 8 | + Range string `json:"range,outline"` |
| 9 | + Data []byte `json:"data,flow"` // MATCH /unknown option "flow" in json tag/ |
| 10 | +} |
| 11 | + |
| 12 | +type RangeAllocation struct { |
| 13 | + metav1.TypeMeta `bson:",minsize,gnu"` |
| 14 | + metav1.ObjectMeta `bson:"metadata,omitempty"` |
| 15 | + Range string `bson:"range,flow"` // MATCH /unknown option "flow" in bson tag/ |
| 16 | + Data []byte `bson:"data,inline"` |
| 17 | +} |
| 18 | + |
| 19 | +type RequestQueryOptions struct { |
| 20 | + Properties []string `url:"properties,commmma,omitempty"` // MATCH /unknown option "commmma" in url tag/ |
| 21 | + CustomProperties []string `url:"-"` |
| 22 | + Archived bool `url:"archived,myURLOption"` |
| 23 | +} |
| 24 | + |
| 25 | +type Fields struct { |
| 26 | + Field string `datastore:",noindex,flatten,omitempty,myDatastoreOption"` |
| 27 | + OtherField string `datastore:",unknownOption"` // MATCH /unknown option "unknownOption" in datastore tag/ |
| 28 | +} |
| 29 | + |
| 30 | +type MapStruct struct { |
| 31 | + Field1 string `mapstructure:",squash,reminder,omitempty,myMapstructureOption"` |
| 32 | + OtherField string `mapstructure:",unknownOption"` // MATCH /unknown option "unknownOption" in mapstructure tag/ |
| 33 | +} |
| 34 | + |
| 35 | +type ValidateUser struct { |
| 36 | + Username string `validate:"required,min=3,max=32"` |
| 37 | + Email string `validate:"required,email"` |
| 38 | + Password string `validate:"required,min=8,max=32"` |
| 39 | + Biography string `validate:"min=0,max=1000"` |
| 40 | + DisplayName string `validate:"displayName,min=3,max=32"` |
| 41 | + Complex string `validate:"gt=0,dive,keys,eq=1|eq=2,endkeys,required"` |
| 42 | + BadComplex string `validate:"gt=0,keys,eq=1|eq=2,endkeys,required"` |
| 43 | + BadComplex2 string `validate:"gt=0,dive,eq=1|eq=2,endkeys,required"` |
| 44 | + BadComplex3 string `validate:"gt=0,dive,keys,eq=1|eq=2,endkeys,endkeys,required"` |
| 45 | +} |
| 46 | + |
| 47 | +type TomlUser struct { |
| 48 | + Username string `toml:"username,omitempty"` |
| 49 | + Location string `toml:"location,unknown"` |
| 50 | +} |
| 51 | + |
| 52 | +type SpannerUserOptions struct { |
| 53 | + ID int `spanner:"user_id,mySpannerOption"` |
| 54 | + A int `spanner:"-,mySpannerOption"` // MATCH /useless option mySpannerOption for ignored field in spanner tag/ |
| 55 | + Name string `spanner:"full_name,unknownOption"` // MATCH /unknown option "unknownOption" in spanner tag/ |
| 56 | +} |
| 57 | + |
| 58 | +type uselessOptions struct { |
| 59 | + A int `bson:"-,"` |
| 60 | + B int `bson:"-,omitempty"` // MATCH /useless option omitempty for ignored field in bson tag/ |
| 61 | + C int `bson:"-,omitempty,omitempty"` // MATCH /useless options omitempty,omitempty for ignored field in bson tag/ |
| 62 | + D int `datastore:"-,"` |
| 63 | + E int `datastore:"-,omitempty"` // MATCH /useless option omitempty for ignored field in datastore tag/ |
| 64 | + F int `datastore:"-,omitempty,omitempty"` // MATCH /useless options omitempty,omitempty for ignored field in datastore tag/ |
| 65 | + G int `json:"-,"` |
| 66 | + H int `json:"-,omitempty"` // MATCH /useless option omitempty for ignored field in json tag/ |
| 67 | + I int `json:"-,omitempty,omitempty"` // MATCH /useless options omitempty,omitempty for ignored field in json tag/ |
| 68 | + J int `mapstructure:"-,"` |
| 69 | + K int `mapstructure:"-,squash"` // MATCH /useless option squash for ignored field in mapstructure tag/ |
| 70 | + L int `mapstructure:"-,omitempty,omitempty"` // MATCH /useless options omitempty,omitempty for ignored field in mapstructure tag/ |
| 71 | + M int `properties:"-,"` |
| 72 | + N int `properties:"-,default=15"` // MATCH /useless option default=15 for ignored field in properties tag/ |
| 73 | + O time.Time `properties:"-,layout=2006-01-02,default=2006-01-02"` // MATCH /useless options layout=2006-01-02,default=2006-01-02 for ignored field in properties tag/ |
| 74 | + P int `spanner:"-,"` |
| 75 | + Q int `spanner:"-,mySpannerOption"` // MATCH /useless option mySpannerOption for ignored field in spanner tag/ |
| 76 | + R int `spanner:"-,mySpannerOption,mySpannerOption"` // MATCH /useless options mySpannerOption,mySpannerOption for ignored field in spanner tag/ |
| 77 | + S int `toml:"-,"` |
| 78 | + T int `toml:"-,omitempty"` |
| 79 | + U int `toml:"-,omitempty,omitempty"` |
| 80 | + V int `url:"-,"` |
| 81 | + W int `url:"-,omitempty"` // MATCH /useless option omitempty for ignored field in url tag/ |
| 82 | + X int `url:"-,omitempty,omitempty"` // MATCH /useless options omitempty,omitempty for ignored field in url tag/ |
| 83 | + Y int `xml:"-,"` |
| 84 | + Z int `xml:"-,omitempty"` // MATCH /useless option omitempty for ignored field in xml tag/ |
| 85 | + Aa int `xml:"-,omitempty,omitempty"` // MATCH /useless options omitempty,omitempty for ignored field in xml tag/ |
| 86 | + Ba int `yaml:"-,"` |
| 87 | + Ca int `yaml:"-,omitempty"` // MATCH /useless option omitempty for ignored field in yaml tag/ |
| 88 | + Da int `yaml:"-,omitempty,omitempty"` // MATCH /useless options omitempty,omitempty for ignored field in yaml tag/ |
| 89 | + |
| 90 | + // MATCH:59 /unknown option "" in bson tag/ |
| 91 | + // MATCH:62 /unknown option "" in datastore tag/ |
| 92 | + // MATCH:68 /unknown option "" in mapstructure tag/ |
| 93 | + // MATCH:71 /unknown or malformed option "" in properties tag/ |
| 94 | + // MATCH:74 /unknown option "" in spanner tag/ |
| 95 | + // MATCH:80 /unknown option "" in url tag/ |
| 96 | + // MATCH:83 /unknown option "" in xml tag/ |
| 97 | + // MATCH:86 /unknown option "" in yaml tag/ |
| 98 | +} |
0 commit comments