From 6363518c85cbd8247a5f6507b8a1dd3903cfb71d Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 29 Jul 2018 18:11:33 +0200 Subject: relay connection working with gqlgen --- cache/cache.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cache/cache.go') diff --git a/cache/cache.go b/cache/cache.go index c440646e..779b95b0 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -27,7 +27,7 @@ type RepoCacher interface { } type BugCacher interface { - Snapshot() bug.Snapshot + Snapshot() *bug.Snapshot ClearSnapshot() } @@ -37,8 +37,8 @@ type RootCache struct { repos map[string]RepoCacher } -func NewCache() Cacher { - return &RootCache{ +func NewCache() RootCache { + return RootCache{ repos: make(map[string]RepoCacher), } } @@ -172,12 +172,12 @@ func NewBugCache(b *bug.Bug) BugCacher { } } -func (c BugCache) Snapshot() bug.Snapshot { +func (c BugCache) Snapshot() *bug.Snapshot { if c.snap == nil { snap := c.bug.Compile() c.snap = &snap } - return *c.snap + return c.snap } func (c BugCache) ClearSnapshot() { -- cgit