golangci-lint/test/testdata/tagliatelle.go

34 lines
1 KiB
Go
Raw Permalink Normal View History

//golangcitest:args -Etagliatelle
2021-04-12 17:59:50 +02:00
package testdata
import "time"
type TglFoo struct {
ID string `json:"ID"` // want `json\(camel\): got 'ID' want 'id'`
UserID string `json:"UserID"` // want `json\(camel\): got 'UserID' want 'userId'`
2021-04-12 17:59:50 +02:00
Name string `json:"name"`
Value time.Duration `json:"value,omitempty"`
Bar TglBar `json:"bar"`
Bur `json:"bur"`
}
type TglBar struct {
Name string `json:"-"`
Value string `json:"value"`
CommonServiceFooItem *TglBir `json:"CommonServiceItem,omitempty"` // want `json\(camel\): got 'CommonServiceItem' want 'commonServiceItem'`
2021-04-12 17:59:50 +02:00
}
type TglBir struct {
Name string `json:"-"`
Value string `json:"value"`
ReplaceAllowList []string `mapstructure:"replace-allow-list"`
}
type Bur struct {
Name string
Value string `yaml:"Value"` // want `yaml\(camel\): got 'Value' want 'value'`
2021-04-12 17:59:50 +02:00
More string `json:"-"`
Also string `json:"also,omitempty"`
2021-04-12 17:59:50 +02:00
ReqPerS string `avro:"req_per_s"`
}