From c350d325e903fcbfa9abc5e5a304d42116272496 Mon Sep 17 00:00:00 2001 From: Jian Huang Date: Sat, 15 Aug 2015 17:04:12 +0800 Subject: [PATCH] Solve Static Check Error --- pkg/api/resource/quantity_test.go | 2 +- pkg/storage/cacher.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/api/resource/quantity_test.go b/pkg/api/resource/quantity_test.go index b9024bfa66e..70f4836bb1d 100644 --- a/pkg/api/resource/quantity_test.go +++ b/pkg/api/resource/quantity_test.go @@ -488,7 +488,7 @@ func TestUninitializedNoCrash(t *testing.T) { q.Value() q.MilliValue() q.Copy() - q.String() + _ = q.String() q.MarshalJSON() } diff --git a/pkg/storage/cacher.go b/pkg/storage/cacher.go index ad2896c4191..842867fabc9 100644 --- a/pkg/storage/cacher.go +++ b/pkg/storage/cacher.go @@ -322,11 +322,11 @@ func (c *cacheWatcher) sendWatchCacheEvent(event cache.WatchCacheEvent) { } switch { case curObjPasses && !oldObjPasses: - c.result <- watch.Event{watch.Added, event.Object} + c.result <- watch.Event{Type: watch.Added, Object: event.Object} case curObjPasses && oldObjPasses: - c.result <- watch.Event{watch.Modified, event.Object} + c.result <- watch.Event{Type: watch.Modified, Object: event.Object} case !curObjPasses && oldObjPasses: - c.result <- watch.Event{watch.Deleted, event.Object} + c.result <- watch.Event{Type: watch.Deleted, Object: event.Object} } }