1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

Ensure make invocations pass linter (#2518)

Signed-off-by: Marcel Mueller <marcel.mueller1@rwth-aachen.de>
This commit is contained in:
Bricktop 2021-10-11 23:43:09 +02:00 committed by GitHub
parent 8eb0e4c83a
commit 23864d89c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View file

@ -1608,12 +1608,12 @@ func Test_Eval_Equal_Var_Fail(t *testing.T) {
func Test_Eval_In_String_Set_Pass(t *testing.T) {
ctx := context.NewContext()
key := [2]string{"1.1.1.1", "2.2.2.2"}
keyInterface := make([]interface{}, len(key), len(key))
keyInterface := make([]interface{}, len(key))
for i := range key {
keyInterface[i] = key[i]
}
value := [3]string{"1.1.1.1", "2.2.2.2", "3.3.3.3"}
valueInterface := make([]interface{}, len(value), len(value))
valueInterface := make([]interface{}, len(value))
for i := range value {
valueInterface[i] = value[i]
}
@ -1638,7 +1638,7 @@ func Test_Eval_In_String_Set_Fail(t *testing.T) {
keyInterface[i] = key[i]
}
value := [3]string{"1.1.1.1", "2.2.2.2", "3.3.3.3"}
valueInterface := make([]interface{}, len(value), len(value))
valueInterface := make([]interface{}, len(value))
for i := range value {
valueInterface[i] = value[i]
}
@ -1658,12 +1658,12 @@ func Test_Eval_In_String_Set_Fail(t *testing.T) {
func Test_Eval_NotIn_String_Set_Pass(t *testing.T) {
ctx := context.NewContext()
key := [3]string{"1.1.1.1", "4.4.4.4", "5.5.5.5"}
keyInterface := make([]interface{}, len(key), len(key))
keyInterface := make([]interface{}, len(key))
for i := range key {
keyInterface[i] = key[i]
}
value := [3]string{"1.1.1.1", "2.2.2.2", "3.3.3.3"}
valueInterface := make([]interface{}, len(value), len(value))
valueInterface := make([]interface{}, len(value))
for i := range value {
valueInterface[i] = value[i]
}
@ -1683,12 +1683,12 @@ func Test_Eval_NotIn_String_Set_Pass(t *testing.T) {
func Test_Eval_NotIn_String_Set_Fail(t *testing.T) {
ctx := context.NewContext()
key := [2]string{"1.1.1.1", "2.2.2.2"}
keyInterface := make([]interface{}, len(key), len(key))
keyInterface := make([]interface{}, len(key))
for i := range key {
keyInterface[i] = key[i]
}
value := [3]string{"1.1.1.1", "2.2.2.2", "3.3.3.3"}
valueInterface := make([]interface{}, len(value), len(value))
valueInterface := make([]interface{}, len(value))
for i := range value {
valueInterface[i] = value[i]
}

View file

@ -347,7 +347,7 @@ func (builder *requestBuilder) fetchAnnotations(policy, ns string) map[string]st
}
}
return make(map[string]string, 0)
return make(map[string]string)
}
func isResourceDeletion(info Info) bool {

View file

@ -117,7 +117,7 @@ func (c *changeRequestCreator) mergeRequests() (results []*unstructured.Unstruct
defer c.mutex.Unlock()
mergedCRCR := &unstructured.Unstructured{}
mergedRCR := make(map[string]*unstructured.Unstructured, 0)
mergedRCR := make(map[string]*unstructured.Unstructured)
size = len(c.queue)
for _, uid := range c.queue {