chore: enable use-any from revive

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2025-01-17 07:51:57 +01:00
parent 5b1738abf8
commit cbba3bdde7
139 changed files with 798 additions and 799 deletions

View File

@@ -33,9 +33,9 @@ const (
ConfigKeyColorized = "colorized"
)
// VeleroConfig is a map of strings to interface{} for deserializing Velero client config options.
// VeleroConfig is a map of strings to any for deserializing Velero client config options.
// The alias is a way to attach type-asserting convenience methods.
type VeleroConfig map[string]interface{}
type VeleroConfig map[string]any
// LoadConfig loads the Velero client configuration file and returns it as a VeleroConfig. If the
// file does not exist, an empty map is returned.

View File

@@ -31,14 +31,14 @@ func TestFactory(t *testing.T) {
// Env variable should set the namespace if no config or argument are used
os.Setenv("VELERO_NAMESPACE", "env-velero")
f := NewFactory("velero", "", make(map[string]interface{}))
f := NewFactory("velero", "", make(map[string]any))
assert.Equal(t, "env-velero", f.Namespace())
os.Unsetenv("VELERO_NAMESPACE")
// Argument should change the namespace
f = NewFactory("velero", "", make(map[string]interface{}))
f = NewFactory("velero", "", make(map[string]any))
s := "flag-velero"
flags := new(pflag.FlagSet)
@@ -50,7 +50,7 @@ func TestFactory(t *testing.T) {
// An argument overrides the env variable if both are set.
os.Setenv("VELERO_NAMESPACE", "env-velero")
f = NewFactory("velero", "", make(map[string]interface{}))
f = NewFactory("velero", "", make(map[string]any))
flags = new(pflag.FlagSet)
f.BindFlags(flags)