Skip to content

Commit

Permalink
Don't make empty list nil
Browse files Browse the repository at this point in the history
  • Loading branch information
muzzammilshahid committed Jul 3, 2024
1 parent dafe7ce commit a8ae373
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func SerializerByName(name string) serializers.Serializer {
}

func StringsToTypedList(strings []string) (typedList []any) {
typedList = make([]any, len(strings))
for _, value := range strings {
if number, errNumber := strconv.Atoi(value); errNumber == nil {
typedList = append(typedList, number)
Expand Down

0 comments on commit a8ae373

Please sign in to comment.