Chore: fix typo (#1017)
This commit is contained in:
2
common/cache/lrucache.go
vendored
2
common/cache/lrucache.go
vendored
@ -121,7 +121,7 @@ func (c *LruCache) Set(key interface{}, value interface{}) {
|
||||
c.SetWithExpire(key, value, time.Unix(expires, 0))
|
||||
}
|
||||
|
||||
// SetWithExpire stores the interface{} representation of a response for a given key and given exires.
|
||||
// SetWithExpire stores the interface{} representation of a response for a given key and given expires.
|
||||
// The expires time will round to second.
|
||||
func (c *LruCache) SetWithExpire(key interface{}, value interface{}, expires time.Time) {
|
||||
c.mu.Lock()
|
||||
|
@ -61,7 +61,7 @@ func (alloc *Allocator) Put(buf []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// msb return the pos of most significiant bit
|
||||
// msb return the pos of most significant bit
|
||||
func msb(size int) uint16 {
|
||||
return uint16(bits.Len32(uint32(size)) - 1)
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ type Result struct {
|
||||
Err error
|
||||
}
|
||||
|
||||
// Do single.Do likes sync.singleFilght
|
||||
//lint:ignore ST1008 it likes sync.singleFilght
|
||||
// Do single.Do likes sync.singleFlight
|
||||
//lint:ignore ST1008 it likes sync.singleFlight
|
||||
func (s *Single) Do(fn func() (interface{}, error)) (v interface{}, err error, shared bool) {
|
||||
s.mux.Lock()
|
||||
now := time.Now()
|
||||
|
Reference in New Issue
Block a user