From b31b4168c86df0c34a69226959adc429c23f793d Mon Sep 17 00:00:00 2001 From: candiduslynx Date: Mon, 25 Sep 2023 09:13:42 +0300 Subject: [PATCH] tidy up --- .gitignore | 2 ++ go.mod | 1 - go.sum | 2 -- reflect.go | 12 ++++++------ 4 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8ef0e14 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +vendor/ +.idea/ diff --git a/go.mod b/go.mod index dcf7130..49c0e35 100644 --- a/go.mod +++ b/go.mod @@ -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 ) diff --git a/go.sum b/go.sum index 2cfaaf2..025db2e 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/reflect.go b/reflect.go index acccd07..3f7a862 100644 --- a/reflect.go +++ b/reflect.go @@ -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, "=") @@ -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, "=") @@ -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, "=") @@ -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, "=") @@ -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, "=") @@ -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 {