Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "context" instead of "golang.org/x/net/context" #2614

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions pkg/portfwd/client.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package portfwd

import (
"context"
"errors"
"fmt"
"io"
Expand All @@ -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) {
Expand Down
Loading