From cc07a1d69b5e71f7c0271f629c188e6be173c21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E4=BA=B2=E5=BA=93=E9=87=8C?= <36129334+wuqinqiang@users.noreply.github.com> Date: Sat, 31 Oct 2020 19:40:07 +0800 Subject: [PATCH] Update sharedcalls.go (#174) Removes unused parameters --- core/syncx/sharedcalls.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/syncx/sharedcalls.go b/core/syncx/sharedcalls.go index 61d6e4fb..9bab2540 100644 --- a/core/syncx/sharedcalls.go +++ b/core/syncx/sharedcalls.go @@ -33,7 +33,7 @@ func NewSharedCalls() SharedCalls { } func (g *sharedGroup) Do(key string, fn func() (interface{}, error)) (interface{}, error) { - c, done := g.createCall(key, fn) + c, done := g.createCall(key) if done { return c.val, c.err } @@ -43,7 +43,7 @@ func (g *sharedGroup) Do(key string, fn func() (interface{}, error)) (interface{ } func (g *sharedGroup) DoEx(key string, fn func() (interface{}, error)) (val interface{}, fresh bool, err error) { - c, done := g.createCall(key, fn) + c, done := g.createCall(key) if done { return c.val, false, c.err } @@ -52,7 +52,7 @@ func (g *sharedGroup) DoEx(key string, fn func() (interface{}, error)) (val inte return c.val, true, c.err } -func (g *sharedGroup) createCall(key string, fn func() (interface{}, error)) (c *call, done bool) { +func (g *sharedGroup) createCall(key string) (c *call, done bool) { g.lock.Lock() if c, ok := g.calls[key]; ok { g.lock.Unlock()