Skip to content

Commit bf20886

Browse files
authored
Merge pull request kubernetes#73990 from xichengliudui/fixlinterror
Fix golint failures pkg/kubelet/util/cache
2 parents 60943a7 + 4c42d54 commit bf20886

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

hack/.golint_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ pkg/kubelet/status/testing
225225
pkg/kubelet/sysctl
226226
pkg/kubelet/types
227227
pkg/kubelet/util
228-
pkg/kubelet/util/cache
229228
pkg/kubelet/util/pluginwatcher
230229
pkg/kubelet/util/queue
231230
pkg/kubelet/util/sliceutils

pkg/kubelet/util/cache/object_cache.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func (c *ObjectCache) Get(key string) (interface{}, error) {
7575
return value.(objectEntry).obj, nil
7676
}
7777

78+
// Add adds objectEntry by using a unique string as the key.
7879
func (c *ObjectCache) Add(key string, obj interface{}) error {
7980
err := c.cache.Add(objectEntry{key: key, obj: obj})
8081
if err != nil {

pkg/kubelet/util/cache/object_cache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func TestAddAndGet(t *testing.T) {
4646
val: "bar",
4747
}
4848
objectCache := NewFakeObjectCache(func() (interface{}, error) {
49-
return nil, fmt.Errorf("Unexpected Error: updater should never be called in this test!")
49+
return nil, fmt.Errorf("Unexpected Error: updater should never be called in this test")
5050
}, 1*time.Hour, clock.NewFakeClock(time.Now()))
5151

5252
err := objectCache.Add(testObj.key, testObj.val)

0 commit comments

Comments
 (0)