fix: gcache MustGetOrSetFunc error (#2291)

This commit is contained in:
Charles
2022-11-10 20:34:48 +08:00
committed by GitHub
parent 84b7cbd992
commit b84034b667

View File

@ -196,7 +196,7 @@ func MustGetOrSet(ctx context.Context, key interface{}, value interface{}, durat
// MustGetOrSetFunc acts like GetOrSetFunc, but it panics if any error occurs.
func MustGetOrSetFunc(ctx context.Context, key interface{}, f Func, duration time.Duration) *gvar.Var {
return defaultCache.MustGetOrSet(ctx, key, f, duration)
return defaultCache.MustGetOrSetFunc(ctx, key, f, duration)
}
// MustGetOrSetFuncLock acts like GetOrSetFuncLock, but it panics if any error occurs.