Skip to content

Commit

Permalink
Merge pull request #2614 from alexandear/refactor/use-context
Browse files Browse the repository at this point in the history
Use "context" instead of "golang.org/x/net/context"
  • Loading branch information
jandubois authored Sep 12, 2024
2 parents 59beedd + 2619536 commit 11a8430
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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

0 comments on commit 11a8430

Please sign in to comment.