Skip to content

Commit

Permalink
Merge pull request #684 from testwill/slice
Browse files Browse the repository at this point in the history
chore: slice loop replace
  • Loading branch information
chris-ramon authored Mar 25, 2024
2 parents 4ebf270 + 1154997 commit f2b39ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ func NewSchema(config SchemaConfig) (Schema, error) {
initialTypes = append(initialTypes, SchemaType)
}

for _, ttype := range config.Types {
// assume that user will never add a nil object to config
initialTypes = append(initialTypes, ttype)
}
// assume that user will never add a nil object to config
initialTypes = append(initialTypes, config.Types...)

for _, ttype := range initialTypes {
if ttype.Error() != nil {
Expand Down

0 comments on commit f2b39ca

Please sign in to comment.