Merge pull request #9423 from Lyndon-Li/fix-linter-error
Run the E2E test on kind / get-go-version (push) Failing after 1m8s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 2s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 11s
Main CI / Build (push) Failing after 28s
Close stale issues and PRs / stale (push) Successful in 12s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m25s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m13s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m0s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m10s

Fix linter error
This commit is contained in:
Daniel Jiang
2025-11-24 18:29:28 +08:00
committed by GitHub
39 changed files with 76 additions and 39 deletions
+1 -1
View File
@@ -42,7 +42,6 @@ require (
github.com/vmware-tanzu/crash-diagnostics v0.3.7
go.uber.org/zap v1.27.0
golang.org/x/mod v0.29.0
golang.org/x/net v0.47.0
golang.org/x/oauth2 v0.30.0
golang.org/x/text v0.31.0
google.golang.org/api v0.241.0
@@ -182,6 +181,7 @@ require (
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/sync v0.18.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/term v0.37.0 // indirect
+2 -1
View File
@@ -17,8 +17,9 @@ limitations under the License.
package framework
import (
"context"
plugin "github.com/hashicorp/go-plugin"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
@@ -19,8 +19,9 @@ package framework
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/grpc"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
@@ -19,8 +19,9 @@ package framework
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
@@ -17,8 +17,9 @@ limitations under the License.
package v2
import (
"context"
plugin "github.com/hashicorp/go-plugin"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
@@ -19,8 +19,9 @@ package v2
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/grpc"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
@@ -19,8 +19,9 @@ package v2
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/protobuf/types/known/emptypb"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+2 -1
View File
@@ -17,8 +17,9 @@ limitations under the License.
package framework
import (
"context"
plugin "github.com/hashicorp/go-plugin"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
@@ -19,8 +19,9 @@ package framework
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
@@ -19,8 +19,9 @@ package framework
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
@@ -17,8 +17,9 @@ limitations under the License.
package v1
import (
"context"
plugin "github.com/hashicorp/go-plugin"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
@@ -19,8 +19,9 @@ package v1
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/grpc"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -19,8 +19,9 @@ package v1
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
+2 -1
View File
@@ -17,8 +17,9 @@ limitations under the License.
package framework
import (
"context"
plugin "github.com/hashicorp/go-plugin"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
+2 -1
View File
@@ -20,8 +20,9 @@ import (
"io"
"time"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
+2 -1
View File
@@ -20,8 +20,9 @@ import (
"io"
"time"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
proto "github.com/vmware-tanzu/velero/pkg/plugin/generated"
+2 -1
View File
@@ -17,9 +17,10 @@ limitations under the License.
package framework
import (
"context"
plugin "github.com/hashicorp/go-plugin"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
+2 -1
View File
@@ -17,8 +17,9 @@ limitations under the License.
package framework
import (
"context"
plugin "github.com/hashicorp/go-plugin"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
@@ -19,8 +19,9 @@ package framework
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/grpc"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -19,8 +19,9 @@ package framework
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
@@ -17,8 +17,9 @@ limitations under the License.
package v2
import (
"context"
plugin "github.com/hashicorp/go-plugin"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
@@ -19,8 +19,9 @@ package v2
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/grpc"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -19,8 +19,9 @@ package v2
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/protobuf/types/known/durationpb"
"google.golang.org/protobuf/types/known/emptypb"
"google.golang.org/protobuf/types/known/timestamppb"
+2 -1
View File
@@ -17,8 +17,9 @@ limitations under the License.
package framework
import (
"context"
plugin "github.com/hashicorp/go-plugin"
"golang.org/x/net/context"
"google.golang.org/grpc"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
@@ -19,8 +19,9 @@ package framework
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"google.golang.org/grpc"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
@@ -19,8 +19,9 @@ package framework
import (
"encoding/json"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
@@ -20,9 +20,10 @@ import (
"testing"
"time"
"context"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
+2 -1
View File
@@ -22,7 +22,8 @@ import (
"strings"
"time"
"golang.org/x/net/context"
"context"
"k8s.io/apimachinery/pkg/util/wait"
veleroexec "github.com/vmware-tanzu/velero/pkg/util/exec"
+1 -1
View File
@@ -21,7 +21,7 @@ import (
"os/exec"
"strings"
"golang.org/x/net/context"
"context"
veleroexec "github.com/vmware-tanzu/velero/pkg/util/exec"
)
+2 -1
View File
@@ -23,8 +23,9 @@ import (
"strings"
"time"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
corev1api "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
+2 -1
View File
@@ -20,9 +20,10 @@ import (
"fmt"
"time"
"context"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
corev1api "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+2 -1
View File
@@ -22,8 +22,9 @@ import (
"strings"
"time"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
veleroexec "github.com/vmware-tanzu/velero/pkg/util/exec"
)
+2 -1
View File
@@ -21,7 +21,8 @@ import (
"path"
"time"
"golang.org/x/net/context"
"context"
appsv1api "k8s.io/api/apps/v1"
corev1api "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+2 -1
View File
@@ -20,9 +20,10 @@ import (
"fmt"
"time"
"context"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
corev1api "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+2 -1
View File
@@ -20,8 +20,9 @@ import (
"fmt"
"os/exec"
"context"
"github.com/pkg/errors"
"golang.org/x/net/context"
veleroexec "github.com/vmware-tanzu/velero/pkg/util/exec"
)
+2 -1
View File
@@ -26,9 +26,10 @@ import (
"strings"
"time"
"context"
. "github.com/onsi/ginkgo/v2"
"github.com/pkg/errors"
"golang.org/x/net/context"
appsv1api "k8s.io/api/apps/v1"
corev1api "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/wait"
+2 -1
View File
@@ -26,6 +26,8 @@ import (
"os"
"strings"
"context"
"github.com/aws/aws-sdk-go-v2/aws"
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
"github.com/aws/aws-sdk-go-v2/config"
@@ -35,7 +37,6 @@ import (
"github.com/aws/aws-sdk-go-v2/service/s3"
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/pkg/errors"
"golang.org/x/net/context"
"github.com/vmware-tanzu/velero/pkg/cmd/util/flag"
"github.com/vmware-tanzu/velero/test"
+2 -1
View File
@@ -23,6 +23,8 @@ import (
"os"
"strings"
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
@@ -36,7 +38,6 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/container"
"github.com/joho/godotenv"
"github.com/pkg/errors"
"golang.org/x/net/context"
"github.com/vmware-tanzu/velero/pkg/cmd/util/flag"
. "github.com/vmware-tanzu/velero/test"
+2 -1
View File
@@ -23,9 +23,10 @@ import (
"os"
"strings"
"context"
"cloud.google.com/go/storage"
"github.com/pkg/errors"
"golang.org/x/net/context"
"golang.org/x/oauth2/google"
"google.golang.org/api/compute/v1"
"google.golang.org/api/iterator"