Skip to content

Commit

Permalink
deal with latest linter changes
Browse files Browse the repository at this point in the history
  • Loading branch information
squeedee committed Oct 16, 2023
1 parent ea2041a commit b3dda55
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
17 changes: 17 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
linters-settings:
depguard:
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/pivotal
- github.com/spf13/cobra
- github.com/vmware-tanzu
- github.com/pkg/errors
- github.com/stern/stern
- github.com/fatih/color
- k8s.io
- knative.dev
- sigs.k8s.io
goconst:
min-len: 2
min-occurrences: 2
Expand Down
10 changes: 5 additions & 5 deletions pkg/logs/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ package logs
import (
"context"
"fmt"
"sync"

"github.com/pkg/errors"
"github.com/stern/stern/stern"
"k8s.io/client-go/kubernetes"
"sync"
)

var tails = make(map[string]*stern.Tail)
Expand Down Expand Up @@ -91,11 +92,10 @@ func Run(ctx context.Context, clientSet *kubernetes.Clientset, config *stern.Con
if tail, ok := getTail(targetID); ok {
if tail.IsActive() {
continue
} else {
// fmt.Printf("::endgroup::\n")
tail.Close()
clearTail(targetID)
}
// fmt.Printf("::endgroup::\n")
tail.Close()
clearTail(targetID)
}

// fmt.Printf("::group::%s\n", p.Container)
Expand Down

0 comments on commit b3dda55

Please sign in to comment.