From 3f4798d9ace0f70c101e72e0726b058a228c8c1e Mon Sep 17 00:00:00 2001 From: yttan Date: Tue, 8 Sep 2020 15:01:45 +0800 Subject: [PATCH] fix golint failures for staging/src/k8s.io/client-go/examples/workqueue Kubernetes-commit: d3db1ec12d1156fbdefacb15b5c5c6d31523a163 --- examples/workqueue/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/workqueue/main.go b/examples/workqueue/main.go index 7f7ae5ce..cb00a985 100644 --- a/examples/workqueue/main.go +++ b/examples/workqueue/main.go @@ -34,12 +34,14 @@ import ( "k8s.io/client-go/util/workqueue" ) +// Controller demonstrates how to implement a controller with client-go. type Controller struct { indexer cache.Indexer queue workqueue.RateLimitingInterface informer cache.Controller } +// NewController creates a new Controller. func NewController(queue workqueue.RateLimitingInterface, indexer cache.Indexer, informer cache.Controller) *Controller { return &Controller{ informer: informer, @@ -113,6 +115,7 @@ func (c *Controller) handleErr(err error, key interface{}) { klog.Infof("Dropping pod %q out of the queue: %v", key, err) } +// Run begins watching and syncing. func (c *Controller) Run(threadiness int, stopCh chan struct{}) { defer runtime.HandleCrash()