Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
qmhu committed Aug 11, 2023
1 parent 6df3357 commit ca2be38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/controller/recommendation/recommendation_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ type Checker struct {

func (r Checker) Run(stopCh <-chan struct{}) {
go func() {
ticker := time.NewTicker(r.MonitorInterval)
defer ticker.Stop()

for {
select {
case <-stopCh:
return
case <-time.Tick(r.MonitorInterval):
case <-ticker.C:
r.runChecker()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package recommendation
import (
"context"
"fmt"
"github.com/gocrane/crane/pkg/metrics"
"sort"
"strconv"
"strings"
Expand Down Expand Up @@ -33,6 +32,7 @@ import (
analysisv1alph1 "github.com/gocrane/api/analysis/v1alpha1"

"github.com/gocrane/crane/pkg/known"
"github.com/gocrane/crane/pkg/metrics"
"github.com/gocrane/crane/pkg/oom"
predictormgr "github.com/gocrane/crane/pkg/predictor"
"github.com/gocrane/crane/pkg/providers"
Expand Down

0 comments on commit ca2be38

Please sign in to comment.