list-type.go: constructor newListA(), called without arguments, now creates an empty list, not a nil object

This commit is contained in:
Celestino Amoroso 2024-06-05 05:03:37 +02:00
parent ca12722c93
commit 4e3af837e6

View File

@ -13,6 +13,9 @@ import (
type ListType []any
func newListA(listAny ...any) (list *ListType) {
if listAny == nil {
listAny = []any{}
}
return newList(listAny)
}