Replace golang.org/x/net/context with context package to fix linter issues.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
Xun Jiang
2025-12-24 14:49:10 +08:00
parent 8e35a190c2
commit 77b68121ae
40 changed files with 49 additions and 41 deletions
+1 -1
View File
@@ -17,12 +17,12 @@ limitations under the License.
package k8s
import (
"context"
"fmt"
"os/exec"
"strings"
"time"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/util/wait"
veleroexec "github.com/vmware-tanzu/velero/pkg/util/exec"
+1 -2
View File
@@ -17,12 +17,11 @@ limitations under the License.
package k8s
import (
"context"
"fmt"
"os/exec"
"strings"
"golang.org/x/net/context"
veleroexec "github.com/vmware-tanzu/velero/pkg/util/exec"
)
+1 -1
View File
@@ -17,6 +17,7 @@ limitations under the License.
package k8s
import (
"context"
"fmt"
"os"
"os/exec"
@@ -24,7 +25,6 @@ import (
"time"
"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"
+1 -1
View File
@@ -17,12 +17,12 @@ limitations under the License.
package k8s
import (
"context"
"fmt"
"time"
"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"
+1 -1
View File
@@ -17,13 +17,13 @@ limitations under the License.
package k8s
import (
"context"
"fmt"
"os/exec"
"strings"
"time"
"github.com/pkg/errors"
"golang.org/x/net/context"
veleroexec "github.com/vmware-tanzu/velero/pkg/util/exec"
)
+1 -1
View File
@@ -17,11 +17,11 @@ limitations under the License.
package k8s
import (
"context"
"fmt"
"path"
"time"
"golang.org/x/net/context"
appsv1api "k8s.io/api/apps/v1"
corev1api "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+1 -1
View File
@@ -17,12 +17,12 @@ limitations under the License.
package k8s
import (
"context"
"fmt"
"time"
"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"
+1 -1
View File
@@ -17,11 +17,11 @@ limitations under the License.
package k8s
import (
"context"
"fmt"
"os/exec"
"github.com/pkg/errors"
"golang.org/x/net/context"
veleroexec "github.com/vmware-tanzu/velero/pkg/util/exec"
)
+1 -1
View File
@@ -17,6 +17,7 @@ limitations under the License.
package kibishii
import (
"context"
"fmt"
"html/template"
"os"
@@ -28,7 +29,6 @@ import (
. "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"
+1 -1
View File
@@ -17,6 +17,7 @@ limitations under the License.
package providers
import (
"context"
"crypto/tls"
"crypto/x509"
"fmt"
@@ -35,7 +36,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"
+1 -1
View File
@@ -17,6 +17,7 @@ limitations under the License.
package providers
import (
"context"
"fmt"
"io"
"log"
@@ -36,7 +37,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"
+1 -1
View File
@@ -17,6 +17,7 @@ limitations under the License.
package providers
import (
"context"
"encoding/json"
"fmt"
"io"
@@ -25,7 +26,6 @@ import (
"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"