Skip to content

Commit

Permalink
linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
jwtryg committed Sep 16, 2024
1 parent d3b8ce4 commit 3786f0a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ func getCustomLogicalSchema(typ Type, ltyp LogicalType) LogicalSchema {
return nil
}

// RegisterCustomLogicalType registers a custom logical type that is not part of the Avro specification
// for the given types.
// RegisterCustomLogicalType registers a custom logical type that is not part of the
// Avro specification for the given types.
// It returns an error if the logical type conflicts with a predefined logical type.
func RegisterCustomLogicalType(ltyp LogicalType, types ...Type) error {
// Ensure that the custom logical type does not overwrite a primitive type
Expand Down Expand Up @@ -709,7 +709,9 @@ func (s *RecordSchema) String() string {
}

if s.logical != nil {
return `{"name":"` + s.FullName() + `","type":"` + typ + `,"fields":[` + fields + `]` + `",` + s.logical.String() + `}`
return fmt.Sprintf("{\"name\":\"%s\", \"type\":\"%s\", \"fields\":[%s]\", %s}",
s.FullName(), typ, fields, s.logical.String(),
)
}

return `{"name":"` + s.FullName() + `","type":"` + typ + `","fields":[` + fields + `]}`
Expand Down Expand Up @@ -1090,7 +1092,8 @@ func (s *EnumSchema) String() string {
}

if s.logical != nil {
return `{"name":"` + s.FullName() + `","type":"enum","symbols":[` + symbols + `]` + `",` + s.logical.String() + `}`
return fmt.Sprintf("{\"name\":\"%s\", \"type\":\"enum\", \"symbols\":[%s]\", %s}",
s.FullName(), symbols, s.logical.String())
}

return `{"name":"` + s.FullName() + `","type":"enum","symbols":[` + symbols + `]}`
Expand Down

0 comments on commit 3786f0a

Please sign in to comment.