mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-10 08:20:59 +00:00
Add error when datamap is nil
This commit is contained in:
@@ -555,6 +555,9 @@ func (rn *RNode) GetValidatedDataMap(expectedKeys []string) (map[string]string,
|
||||
}
|
||||
|
||||
func (rn *RNode) validateDataMap(dataMap map[string]string, expectedKeys []string) error {
|
||||
if dataMap == nil {
|
||||
return fmt.Errorf("The datamap is unassigned")
|
||||
}
|
||||
for key := range dataMap {
|
||||
found := false
|
||||
for _, expected := range expectedKeys {
|
||||
|
||||
Reference in New Issue
Block a user