Skip to content

Commit

Permalink
Use "context" instead of "golang.org/x/net/context"
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
  • Loading branch information
alexandear committed Sep 12, 2024
1 parent 59beedd commit fe07c5f
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"

Check failure on line 88 in .golangci.yml

View workflow job for this annotation

GitHub Actions / Lints

88:11 [indentation] wrong indentation: expected 8 but found 10
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 fe07c5f

Please sign in to comment.