Skip to content

Commit

Permalink
quick fix to lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed Mar 24, 2022
1 parent 92b44d0 commit 297bb07
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,16 +686,15 @@ func (t *Schema) genericKeywords(tags []string, parent *Schema, propertyName str
func (t *Schema) booleanKeywords(tags []string) {
for _, tag := range tags {
nameValue := strings.Split(tag, "=")
if len(nameValue) == 2 {
name, val := nameValue[0], nameValue[1]
switch name {
case "default":
switch val {
case "true":
t.Default = true
case "false":
t.Default = false
}
if len(nameValue) != 2 {
continue
}
name, val := nameValue[0], nameValue[1]
if name == "default" {
if val == "true" {
t.Default = true
} else if val == "false" {
t.Default = false
}
}
}
Expand Down

0 comments on commit 297bb07

Please sign in to comment.