// ValidateListSetsAndMaps validates that arrays with x-kubernetes-list-type "map" and "set" fulfill the uniqueness // invariants for the keys (maps) and whole elements (sets). func ValidateListSetsAndMaps(fldPath *field.Path, s *schema.Structural, obj map[string]interface{ … } func validationListSetAndMaps(fldPath *field.Path, s *schema.Structural, obj interface{ … } func validateListSetsAndMapsArray(fldPath *field.Path, s *schema.Structural, obj []interface{ … } // validateListSet validated uniqueness of unstructured objects (scalar and compound) and // returns the first non-unique appearance of items. // // As a special case to distinguish undefined key and null values, we allow unspecifiedKeyValue and nullObjectValue // which are both handled like scalars with correct comparison by Golang. func validateListSet(fldPath *field.Path, obj []interface{ … } func validateListMap(fldPath *field.Path, s *schema.Structural, obj []interface{ … }