Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
erezrokah committed Dec 18, 2024
1 parent 3d025a2 commit 42037ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion transformers/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func DefaultNameTransformer(field reflect.StructField) (string, error) {
return defaultCaser.ToSnake(name), nil
}

func JsonTagOrFieldName(field reflect.StructField) (string, error) {
func JSONTagOrFieldName(field reflect.StructField) (string, error) {
name := field.Name
if jsonTag := strings.Split(field.Tag.Get("json"), ",")[0]; len(jsonTag) > 0 {
// return empty string if the field is not related api response
Expand Down
2 changes: 1 addition & 1 deletion transformers/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ func (t *structTransformer) fieldToJSONSchema(field reflect.StructField, depth i
if !structField.IsExported() || isTypeIgnored(structField.Type) {
continue
}
name, err := JsonTagOrFieldName(structField)
name, err := JSONTagOrFieldName(structField)
if err != nil {
continue
}
Expand Down

0 comments on commit 42037ab

Please sign in to comment.