1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-23 00:01:55 +00:00

chore: make function comment match function name (#12417)

Signed-off-by: momantech <cuimoman@qq.com>
This commit is contained in:
momantech 2025-03-17 19:31:55 +08:00 committed by GitHub
parent d701ab49cf
commit 1982ebca47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View file

@ -105,7 +105,7 @@ func (allin AllInHandler) validateValueWithStringSetPattern(key []string, value
return isAllIn
}
// allsetExistsInArray checks if all key is a subset of value
// allSetExistsInArray checks if all key is a subset of value
// The value can be a string, an array of strings, or a JSON format
// array of strings (e.g. ["val1", "val2", "val3"].
// allnotIn argument if set to true will check for allNotIn

View file

@ -55,7 +55,7 @@ func (anyin AnyInHandler) validateValueWithStringPattern(key string, value inter
return keyExists
}
// anykeyExistsInArray checks if the key exists in the array value
// anyKeyExistsInArray checks if the key exists in the array value
// The value can be a string, an array of strings, or a JSON format
// array of strings (e.g. ["val1", "val2", "val3"].
func anyKeyExistsInArray(key string, value interface{}, log logr.Logger) (invalidType bool, keyExists bool) {
@ -118,7 +118,7 @@ func (anyin AnyInHandler) validateValueWithStringSetPattern(key []string, value
return isAnyIn
}
// anysetExistsInArray checks if any key is a subset of value
// anySetExistsInArray checks if any key is a subset of value
// The value can be a string, an array of strings, or a JSON format
// array of strings (e.g. ["val1", "val2", "val3"].
// notIn argument if set to true will check for NotIn

View file

@ -17,7 +17,7 @@ func ReplaceInSelector(labelSelector *metav1.LabelSelector, resourceLabels map[s
return labelSelector
}
// replaceWildcardsInMap will expand the "key" and "value" and will replace wildcard characters
// replaceWildcardsInMapKeyValues will expand the "key" and "value" and will replace wildcard characters
// It also does not handle anchors as these are not expected in selectors
func replaceWildcardsInMapKeyValues(patternMap map[string]string, resourceMap map[string]string) map[string]string {
result := map[string]string{}

View file

@ -1455,7 +1455,7 @@ func validateImageRegistry(entry kyvernov1.ContextEntry) error {
return nil
}
// validateResourceDescription checks if all necessary fields are present and have values. Also checks a Selector.
// validateMatchedResourceDescription checks if all necessary fields are present and have values. Also checks a Selector.
// field type is checked through openapi
// Returns error if
// - kinds is empty array in matched resource block, i.e. kinds: []