Skip to content

Commit

Permalink
修复由于初始化的时候没有保存redis config导致调用WithContext方法再次初始化实例时会丢失config对象导致空指针错误 (
Browse files Browse the repository at this point in the history
…#34)

Co-authored-by: 朱祥东 <[email protected]>
  • Loading branch information
zxdstyle and 朱祥东 authored Aug 31, 2024
1 parent 736b09a commit 5008def
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func NewRedis(ctx context.Context, config config.Config, store string) (*Redis,
prefix: fmt.Sprintf("%s:", config.GetString("cache.prefix")),
instance: client,
store: store,
config: config,
}, nil
}

Expand Down

0 comments on commit 5008def

Please sign in to comment.