diff --git a/pkg/texttemplate/ast.go b/pkg/texttemplate/ast.go index 9e7f32b9..99e56313 100644 --- a/pkg/texttemplate/ast.go +++ b/pkg/texttemplate/ast.go @@ -49,9 +49,7 @@ func (n *NodeRoot) AsString() string { func (n *NodeRoot) GetValues() []interface{} { var result []interface{} - for _, item := range n.Items { - result = append(result, item) - } + result = append(result, n.Items...) return result } diff --git a/pkg/yttlibrary/assert.go b/pkg/yttlibrary/assert.go index 603f7e4a..5760e9c5 100644 --- a/pkg/yttlibrary/assert.go +++ b/pkg/yttlibrary/assert.go @@ -332,9 +332,7 @@ func (m AssertModule) oneNotNullCheck(keys starlark.Sequence) core.StarlarkFunc var keysToCheck []starlark.Value if keys == nil { - for _, key := range dict.Keys() { - keysToCheck = append(keysToCheck, key) - } + keysToCheck = append(keysToCheck, dict.Keys()...) } else { var key starlark.Value keys := keys.Iterate()