|
1 | 1 | package strict
|
2 | 2 |
|
3 | 3 | type AlignAndSortWithOrderExample struct {
|
4 |
| - Foo int `json:"foo,omitempty" yaml:"bar" xml:"baz" binding:"required" gorm:"column:foo" zip:"foo" validate:"required"` // want `tag is not aligned, should be: json:"foo,omitempty" yaml:"bar" xml:"baz" binding:"required" gorm:"column:foo" validate:"required" zip:"foo"` |
5 |
| - Bar int `validate:"required" yaml:"foo" xml:"bar" binding:"required" json:"bar,omitempty" gorm:"column:bar" zip:"bar" ` // want `tag is not aligned, should be: json:"bar,omitempty" yaml:"foo" xml:"bar" binding:"required" gorm:"column:bar" validate:"required" zip:"bar"` |
6 |
| - FooBar int `gorm:"column:bar" validate:"required" xml:"bar" binding:"required" json:"bar,omitempty" zip:"bar" yaml:"foo"` // want `tag is not aligned, should be: json:"bar,omitempty" yaml:"foo" xml:"bar" binding:"required" gorm:"column:bar" validate:"required" zip:"bar"` |
| 4 | + Foo int `binding:"required" gorm:"column:foo" json:"foo,omitempty" validate:"required" xml:"baz" yaml:"bar" zip:"foo"` // want `tag is not aligned, should be: json:"foo,omitempty" yaml:"bar" xml:"baz" binding:"required" gorm:"column:foo" validate:"required" zip:"foo"` |
| 5 | + Bar int `binding:"required" gorm:"column:bar" json:"bar,omitempty" validate:"required" xml:"bar" yaml:"foo" zip:"bar"` // want `tag is not aligned, should be: json:"bar,omitempty" yaml:"foo" xml:"bar" binding:"required" gorm:"column:bar" validate:"required" zip:"bar"` |
| 6 | + FooBar int `binding:"required" gorm:"column:bar" json:"bar,omitempty" validate:"required" xml:"bar" yaml:"foo" zip:"bar"` // want `tag is not aligned, should be: json:"bar,omitempty" yaml:"foo" xml:"bar" binding:"required" gorm:"column:bar" validate:"required" zip:"bar"` |
7 | 7 | }
|
8 | 8 |
|
9 | 9 | type AlignAndSortWithOrderExample2 struct {
|
10 |
| - Foo int ` xml:"baz" yaml:"bar" zip:"foo" binding:"required" gorm:"column:foo" validate:"required"` // want `tag is not aligned, should be: yaml:"bar" xml:"baz" binding:"required" gorm:"column:foo" validate:"required" zip:"foo"` |
11 |
| - Bar int `validate:"required" gorm:"column:bar" yaml:"foo" xml:"bar" binding:"required" json:"bar,omitempty" ` // want `tag is not aligned, should be: json:"bar,omitempty" yaml:"foo" xml:"bar" binding:"required" gorm:"column:bar" validate:"required"` |
| 10 | + Foo int `binding:"required" gorm:"column:foo" validate:"required" xml:"baz" yaml:"bar" zip:"foo"` // want `tag is not aligned, should be: yaml:"bar" xml:"baz" binding:"required" gorm:"column:foo" validate:"required" zip:"foo"` |
| 11 | + Bar int `binding:"required" gorm:"column:bar" json:"bar,omitempty" validate:"required" xml:"bar" yaml:"foo"` // want `tag is not aligned, should be: json:"bar,omitempty" yaml:"foo" xml:"bar" binding:"required" gorm:"column:bar" validate:"required"` |
12 | 12 | }
|
13 | 13 |
|
14 | 14 | type AlignAndSortWithOrderExample3 struct {
|
15 |
| - Foo int ` zip:"foo" gorm:"column:foo"` // want `tag is not aligned, should be: gorm:"column:foo" zip:"foo"` |
16 |
| - Bar int `binding:"required" gorm:"column:bar" validate:"required" xml:"barxxxxxxxxxxxx" yaml:"foo" zip:"bar" json:"bar,omitempty" ` // want `tag is not aligned, should be: json:"bar,omitempty" yaml:"foo" xml:"barxxxxxxxxxxxx" binding:"required" gorm:"column:bar" validate:"required" zip:"bar"` |
17 |
| - FooBar int `binding:"required" gorm:"column:bar" json:"bar,omitempty" validate:"required" yaml:"foo" zip:"bar"` // want `tag is not aligned, should be: json:"bar,omitempty" yaml:"foo" binding:"required" gorm:"column:bar" validate:"required" zip:"bar"` |
| 15 | + Foo int ` gorm:"column:foo" zip:"foo"` // want `tag is not aligned, should be: gorm:"column:foo" zip:"foo"` |
| 16 | + Bar int `binding:"required" gorm:"column:bar" json:"bar,omitempty" validate:"required" xml:"barxxxxxxxxxxxx" yaml:"foo" zip:"bar"` // want `tag is not aligned, should be: json:"bar,omitempty" yaml:"foo" xml:"barxxxxxxxxxxxx" binding:"required" gorm:"column:bar" validate:"required" zip:"bar"` |
| 17 | + FooBar int `binding:"required" gorm:"column:bar" json:"bar,omitempty" validate:"required" yaml:"foo" zip:"bar"` // want `tag is not aligned, should be: json:"bar,omitempty" yaml:"foo" binding:"required" gorm:"column:bar" validate:"required" zip:"bar"` |
18 | 18 | }
|
0 commit comments