Skip to content

Commit

Permalink
Fix golint failures
Browse files Browse the repository at this point in the history
update pull request

update pull request
  • Loading branch information
xichengliudui committed Feb 12, 2019
1 parent 5c780c8 commit 4c42d54
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion hack/.golint_failures
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ pkg/kubelet/status/testing
pkg/kubelet/sysctl
pkg/kubelet/types
pkg/kubelet/util
pkg/kubelet/util/cache
pkg/kubelet/util/pluginwatcher
pkg/kubelet/util/queue
pkg/kubelet/util/sliceutils
Expand Down
1 change: 1 addition & 0 deletions pkg/kubelet/util/cache/object_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func (c *ObjectCache) Get(key string) (interface{}, error) {
return value.(objectEntry).obj, nil
}

// Add adds objectEntry by using a unique string as the key.
func (c *ObjectCache) Add(key string, obj interface{}) error {
err := c.cache.Add(objectEntry{key: key, obj: obj})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubelet/util/cache/object_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestAddAndGet(t *testing.T) {
val: "bar",
}
objectCache := NewFakeObjectCache(func() (interface{}, error) {
return nil, fmt.Errorf("Unexpected Error: updater should never be called in this test!")
return nil, fmt.Errorf("Unexpected Error: updater should never be called in this test")
}, 1*time.Hour, clock.NewFakeClock(time.Now()))

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

0 comments on commit 4c42d54

Please sign in to comment.