Skip to content

Commit

Permalink
Enable govet linter
Browse files Browse the repository at this point in the history
  • Loading branch information
dangra committed Aug 11, 2022
1 parent 0882d4d commit 3fa00a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ linters:
# - errcheck
- goimports
- gosimple
# - govet
- govet
# - ineffassign
# - staticcheck
- unconvert
Expand Down
4 changes: 1 addition & 3 deletions internal/command/ping/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func run(ctx context.Context) error {
mu.Unlock()

ctx, cancel := context.WithCancel(ctx)
defer cancel()

if name != "" && name != "gateway" && !strings.HasPrefix(name, "fdaa:") {
// look up names in the background because I was too
Expand Down Expand Up @@ -275,7 +276,6 @@ func run(ctx context.Context) error {
for i := 0; count == 0 || i <= count; i++ {
select {
case <-stp:
cancel()
return nil
case <-ticker.C:
}
Expand All @@ -289,8 +289,6 @@ func run(ctx context.Context) error {
}
}

cancel()

return nil
}

Expand Down

0 comments on commit 3fa00a4

Please sign in to comment.