Skip to content

Commit

Permalink
chore: linting code (#1533)
Browse files Browse the repository at this point in the history
* chore: make fmt

* chore: make lint
  • Loading branch information
ubogdan committed Apr 17, 2023
1 parent d76b289 commit 17cc743
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions field_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const (
swaggerTypeTag = "swaggertype"
swaggerIgnoreTag = "swaggerignore"
)

var _ FieldParser = &tagBaseFieldParser{}

var _ FieldParser = &tagBaseFieldParser{}
Expand Down
12 changes: 6 additions & 6 deletions field_parserv3.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,21 +464,21 @@ func (sf *structFieldV3) parseValidTags(validTag string) {
}
}

func (field *structFieldV3) parseEnumTags(enumTag string) error {
enumType := field.schemaType
if field.schemaType == ARRAY {
enumType = field.arrayType
func (sf *structFieldV3) parseEnumTags(enumTag string) error {
enumType := sf.schemaType
if sf.schemaType == ARRAY {
enumType = sf.arrayType
}

field.enums = nil
sf.enums = nil

for _, e := range strings.Split(enumTag, ",") {
value, err := defineType(enumType, e)
if err != nil {
return err
}

field.enums = append(field.enums, value)
sf.enums = append(sf.enums, value)
}

return nil
Expand Down

0 comments on commit 17cc743

Please sign in to comment.