1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00

Unexport Clone and Lock from embedded hooks

This commit is contained in:
Vladimir Mihailenco
2020-02-12 13:02:09 +02:00
parent 6bd8d9ce28
commit 512e6c7a40
4 changed files with 8 additions and 8 deletions

View File

@ -32,13 +32,13 @@ type hooks struct {
hooks []Hook
}
func (hs *hooks) Lock() {
func (hs *hooks) lock() {
hs.hooks = hs.hooks[:len(hs.hooks):len(hs.hooks)]
}
func (hs hooks) Clone() hooks {
func (hs hooks) clone() hooks {
clone := hs
clone.Lock()
clone.lock()
return clone
}
@ -526,7 +526,7 @@ func NewClient(opt *Options) *Client {
func (c *Client) clone() *Client {
clone := *c
clone.cmdable = clone.Process
clone.hooks.Lock()
clone.hooks.lock()
return &clone
}