@@ -39,6 +39,12 @@ func slicePush(_ *templating.Runtime, _ templating.Context, container []any, val
3939 return append (container , value )
4040}
4141
42+ var sliceCreateFunc = modules .NewFunc ("sliceCreate" , sliceCreate )
43+
44+ func sliceCreate (_ * templating.Runtime , _ templating.Context , value ... any ) []any {
45+ return []any {}
46+ }
47+
4248var sliceCreateWithFunc = modules .NewFunc ("sliceCreateWith" , sliceCreateWith )
4349
4450func sliceCreateWith (_ * templating.Runtime , _ templating.Context , value ... any ) []any {
@@ -47,10 +53,10 @@ func sliceCreateWith(_ *templating.Runtime, _ templating.Context, value ...any)
4753 return value
4854}
4955
50- var sliceCreateFunc = modules .NewFunc ("sliceCreate " , sliceCreate )
56+ var mapCreateFunc = modules .NewFunc ("mapCreate " , mapCreate )
5157
52- func sliceCreate (_ * templating.Runtime , _ templating.Context , value ... any ) [ ]any {
53- return [ ]any {}
58+ func mapCreate (_ * templating.Runtime , _ templating.Context ) map [ string ]any {
59+ return map [ string ]any {}
5460}
5561
5662var mapCreateWithFunc = modules .NewFunc ("mapCreateWith" , mapCreateWith )
@@ -73,13 +79,6 @@ func mapCreateWith(_ *templating.Runtime, _ templating.Context, value ...any) ma
7379 return out
7480}
7581
76- var mapCreateFunc = modules .NewFunc ("mapCreate" , sliceCreate )
77-
78- func mapCreate (_ * templating.Runtime , _ templating.Context , value ... any ) map [string ]any {
79- return map [string ]any {}
80- }
81-
82-
8382func hasKey (data any , key any ) bool {
8483 val := reflect .ValueOf (data )
8584
0 commit comments