Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
candiduslynx committed Sep 25, 2023
1 parent 0101b6e commit b31b416
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor/
.idea/
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/invopop/jsonschema
go 1.18

require (
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0
github.com/stretchr/testify v1.8.1
github.com/wk8/go-ordered-map/v2 v2.1.8
)
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx2
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk=
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
Expand Down
12 changes: 6 additions & 6 deletions reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ func (t *Schema) structKeywordsFromTags(f reflect.StructField, parent *Schema, p
t.extraKeywords(extras)
}

// read struct tags for generic keyworks
// read struct tags for generic keywords
func (t *Schema) genericKeywords(tags []string, parent *Schema, propertyName string) { //nolint:gocyclo
for _, tag := range tags {
nameValue := strings.Split(tag, "=")
Expand Down Expand Up @@ -789,7 +789,7 @@ func (t *Schema) genericKeywords(tags []string, parent *Schema, propertyName str
}
}

// read struct tags for boolean type keyworks
// read struct tags for boolean type keywords
func (t *Schema) booleanKeywords(tags []string) {
for _, tag := range tags {
nameValue := strings.Split(tag, "=")
Expand All @@ -807,7 +807,7 @@ func (t *Schema) booleanKeywords(tags []string) {
}
}

// read struct tags for string type keyworks
// read struct tags for string type keywords
func (t *Schema) stringKeywords(tags []string) {
for _, tag := range tags {
nameValue := strings.Split(tag, "=")
Expand Down Expand Up @@ -842,7 +842,7 @@ func (t *Schema) stringKeywords(tags []string) {
}
}

// read struct tags for numerical type keyworks
// read struct tags for numerical type keywords
func (t *Schema) numericalKeywords(tags []string) {
for _, tag := range tags {
nameValue := strings.Split(tag, "=")
Expand Down Expand Up @@ -876,7 +876,7 @@ func (t *Schema) numericalKeywords(tags []string) {
}
}

// read struct tags for object type keyworks
// read struct tags for object type keywords
// func (t *Type) objectKeywords(tags []string) {
// for _, tag := range tags{
// nameValue := strings.Split(tag, "=")
Expand All @@ -892,7 +892,7 @@ func (t *Schema) numericalKeywords(tags []string) {
// }
// }

// read struct tags for array type keyworks
// read struct tags for array type keywords
func (t *Schema) arrayKeywords(tags []string) {
var defaultValues []interface{}
for _, tag := range tags {
Expand Down

0 comments on commit b31b416

Please sign in to comment.