mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #107590 from ialidzhikov/golint/credentialprovider-plugin
Nit: Replace `errors.New(fmt.Sprintf(...))` with `fmt.Errorf(...)`
This commit is contained in:
commit
f50e076756
@ -18,9 +18,7 @@ package plugin
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
@ -29,11 +27,11 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/util/rand"
|
"k8s.io/apimachinery/pkg/util/rand"
|
||||||
|
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
credentialproviderapi "k8s.io/kubelet/pkg/apis/credentialprovider"
|
credentialproviderapi "k8s.io/kubelet/pkg/apis/credentialprovider"
|
||||||
credentialproviderv1alpha1 "k8s.io/kubelet/pkg/apis/credentialprovider/v1alpha1"
|
credentialproviderv1alpha1 "k8s.io/kubelet/pkg/apis/credentialprovider/v1alpha1"
|
||||||
"k8s.io/kubernetes/pkg/credentialprovider"
|
"k8s.io/kubernetes/pkg/credentialprovider"
|
||||||
|
kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config"
|
||||||
"k8s.io/utils/clock"
|
"k8s.io/utils/clock"
|
||||||
testingclock "k8s.io/utils/clock/testing"
|
testingclock "k8s.io/utils/clock/testing"
|
||||||
)
|
)
|
||||||
@ -811,8 +809,8 @@ func Test_ExecPluginEnvVars(t *testing.T) {
|
|||||||
|
|
||||||
func validate(expected, actual []string) error {
|
func validate(expected, actual []string) error {
|
||||||
if len(actual) != len(expected) {
|
if len(actual) != len(expected) {
|
||||||
return errors.New(fmt.Sprintf("actual env var length [%d] and expected env var length [%d] don't match",
|
return fmt.Errorf("actual env var length [%d] and expected env var length [%d] don't match",
|
||||||
len(actual), len(expected)))
|
len(actual), len(expected))
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := range actual {
|
for i := range actual {
|
||||||
|
Loading…
Reference in New Issue
Block a user