Skip to content

Commit

Permalink
bump golang 1.17
Browse files Browse the repository at this point in the history
Signed-off-by: zounengren <nrzou@trip.com>
  • Loading branch information
zouyee committed Nov 29, 2021
1 parent 619e6b9 commit c6fa4eb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ linters-settings:
- pkg: sigs.k8s.io/controller-runtime
alias: ctrl
staticcheck:
go: "1.16"
go: "1.17"
stylecheck:
go: "1.16"
go: "1.17"

issues:
max-same-issues: 0
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/config/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions pkg/internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,13 @@ func (c *Controller) processNextWorkItem(ctx context.Context) bool {
return true
}

// Len returns the current queue length, for informational purposes only. You
// shouldn't e.g. gate a call to Add() or Get() on Len() being a particular
// value, that can't be synchronized properly.
func (c *Controller) Len() int {
return c.Queue.Len()
}

const (
labelError = "error"
labelRequeueAfter = "requeue_after"
Expand Down

0 comments on commit c6fa4eb

Please sign in to comment.