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:58:10 +01:00
parent 5b1738abf8
commit cbba3bdde7
139 changed files with 798 additions and 799 deletions
+3 -3
View File
@@ -257,7 +257,7 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
backupInformer := cache.NewSharedInformer(&lw, &velerov1api.Backup{}, time.Second)
_, _ = backupInformer.AddEventHandler(
cache.FilteringResourceEventHandler{
FilterFunc: func(obj interface{}) bool {
FilterFunc: func(obj any) bool {
backup, ok := obj.(*velerov1api.Backup)
if !ok {
@@ -266,14 +266,14 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
return backup.Name == o.Name
},
Handler: cache.ResourceEventHandlerFuncs{
UpdateFunc: func(_, obj interface{}) {
UpdateFunc: func(_, obj any) {
backup, ok := obj.(*velerov1api.Backup)
if !ok {
return
}
updates <- backup
},
DeleteFunc: func(obj interface{}) {
DeleteFunc: func(obj any) {
backup, ok := obj.(*velerov1api.Backup)
if !ok {
return
+3 -3
View File
@@ -56,7 +56,7 @@ func TestExitWithMessage(t *testing.T) {
name string
message string
succeed bool
args []interface{}
args []any
createErr error
writeFail bool
expectedExitCode int
@@ -77,7 +77,7 @@ func TestExitWithMessage(t *testing.T) {
{
name: "not succeed",
message: "fake-message-1, arg-1 %s, arg-2 %v, arg-3 %v",
args: []interface{}{
args: []any{
"arg-1-1",
10,
false,
@@ -88,7 +88,7 @@ func TestExitWithMessage(t *testing.T) {
{
name: "not succeed",
message: "fake-message-2, arg-1 %s, arg-2 %v, arg-3 %v",
args: []interface{}{
args: []any{
"arg-1-2",
20,
true,
+3 -3
View File
@@ -369,7 +369,7 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
_, _ = restoreInformer.AddEventHandler(
cache.FilteringResourceEventHandler{
FilterFunc: func(obj interface{}) bool {
FilterFunc: func(obj any) bool {
restore, ok := obj.(*api.Restore)
if !ok {
return false
@@ -377,14 +377,14 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
return restore.Name == o.RestoreName
},
Handler: cache.ResourceEventHandlerFuncs{
UpdateFunc: func(_, obj interface{}) {
UpdateFunc: func(_, obj any) {
restore, ok := obj.(*api.Restore)
if !ok {
return
}
updates <- restore
},
DeleteFunc: func(obj interface{}) {
DeleteFunc: func(obj any) {
restore, ok := obj.(*api.Restore)
if !ok {
return