chore: enable gocritic linter (#18633)

* chore: enable gocritic linter

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update settings.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update app.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update grpcproxy.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update grpcproxy.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update util.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update server.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update app_management_ns_test.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update app_management_test.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update path_traversal.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update sessionmanager.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update .golangci.yaml

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

---------

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2024-06-13 21:10:00 +02:00
committed by GitHub
parent 9592b84bcb
commit 9f1e2e8453
31 changed files with 98 additions and 111 deletions

View File

@@ -166,9 +166,7 @@ func newInformer(resClient dynamic.ResourceInterface, controllerNamespace string
&unstructured.Unstructured{},
resyncPeriod,
cache.Indexers{
cache.NamespaceIndex: func(obj interface{}) ([]string, error) {
return cache.MetaNamespaceIndexFunc(obj)
},
cache.NamespaceIndex: cache.MetaNamespaceIndexFunc,
},
)
return informer