return error for duplicate keys rather than panicking

This commit is contained in:
Natasha Sarkar
2021-03-03 12:03:36 -08:00
parent 93dd571df9
commit 722b0131f0
15 changed files with 86 additions and 31 deletions

View File

@@ -76,7 +76,7 @@ type Kunstructured interface {
GetString(string) (string, error)
// Several uses.
Map() map[string]interface{}
Map() (map[string]interface{}, error)
// Used by Resource.AsYAML and Resource.String
MarshalJSON() ([]byte, error)