diff --git a/.golangci.yml b/.golangci.yml index b7e9b2f4120..db13f869cca 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -21,7 +21,7 @@ run: linters: disable-all: true enable: - # - depguard # annoying since golangci-lint v1.53.1 https://github.com/golangci/golangci-lint/issues/3877 + - depguard - gofmt - goimports - govet @@ -81,6 +81,12 @@ linters: # - wrapcheck # - wsl linters-settings: + depguard: + rules: + main: + deny: + - pkg: "golang.org/x/net/context" + desc: "use the 'context' package from the standard library" gocritic: # See "Tags" section in https://github.com/go-critic/go-critic#usage enabled-tags: diff --git a/pkg/portfwd/client.go b/pkg/portfwd/client.go index b7932bd8db7..38a645a4a69 100644 --- a/pkg/portfwd/client.go +++ b/pkg/portfwd/client.go @@ -1,6 +1,7 @@ package portfwd import ( + "context" "errors" "fmt" "io" @@ -9,8 +10,6 @@ import ( "github.com/lima-vm/lima/pkg/guestagent/api" guestagentclient "github.com/lima-vm/lima/pkg/guestagent/api/client" "github.com/sirupsen/logrus" - - "golang.org/x/net/context" ) func HandleTCPConnection(ctx context.Context, client *guestagentclient.GuestAgentClient, conn net.Conn, guestAddr string) {