mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-20 15:04:34 +00:00
fix new linter warnings from prealloc linter
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021-2024 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2021-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/*
|
||||
@@ -113,7 +113,7 @@ func decodeObj(r *http.Request) (runtime.Object, error) {
|
||||
}
|
||||
|
||||
var obj runtime.Object
|
||||
var errs []error //nolint:prealloc
|
||||
var errs []error
|
||||
codecsThatWeUseInOurCode := []runtime.NegotiatedSerializer{
|
||||
kubescheme.Codecs,
|
||||
aggregatorclientscheme.Codecs,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022-2024 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2022-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package testutil
|
||||
@@ -36,8 +36,9 @@ const (
|
||||
|
||||
// allDynamicClientScopes returns a slice of all scopes that are supported by the Supervisor for dynamic clients.
|
||||
func allDynamicClientScopes() []supervisorconfigv1alpha1.Scope {
|
||||
scopes := []supervisorconfigv1alpha1.Scope{}
|
||||
for _, s := range strings.Split(AllDynamicClientScopesSpaceSep, " ") {
|
||||
splitOnSpace := strings.Split(AllDynamicClientScopesSpaceSep, " ")
|
||||
scopes := make([]supervisorconfigv1alpha1.Scope, 0, len(splitOnSpace))
|
||||
for _, s := range splitOnSpace {
|
||||
scopes = append(scopes, supervisorconfigv1alpha1.Scope(s))
|
||||
}
|
||||
return scopes
|
||||
|
||||
Reference in New Issue
Block a user