From 4edfe8e6d8b78da8665354f461581c002120beb4 Mon Sep 17 00:00:00 2001 From: Laurentiu Badea Date: Fri, 4 Sep 2020 00:02:24 +0000 Subject: [PATCH] nil_cache.Get(): return an empty map instead of nil to match expectations that the returned map must be writeable. --- stored_requests/caches/nil_cache/nil_cache.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stored_requests/caches/nil_cache/nil_cache.go b/stored_requests/caches/nil_cache/nil_cache.go index dc26b98e8bb..d043ae55c96 100644 --- a/stored_requests/caches/nil_cache/nil_cache.go +++ b/stored_requests/caches/nil_cache/nil_cache.go @@ -9,8 +9,9 @@ import ( type NilCache struct{} func (c *NilCache) Get(ctx context.Context, ids []string) map[string]json.RawMessage { - return nil + return make(map[string]json.RawMessage) } + func (c *NilCache) Save(ctx context.Context, data map[string]json.RawMessage) { return }