mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +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 {
|
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 {
|
for key := range dataMap {
|
||||||
found := false
|
found := false
|
||||||
for _, expected := range expectedKeys {
|
for _, expected := range expectedKeys {
|
||||||
|
|||||||
Reference in New Issue
Block a user