Chore: fix typo (#1017)

This commit is contained in:
kongminhao
2020-10-14 19:56:02 +08:00
committed by GitHub
parent bc52f8e4fd
commit 8c3e2a7559
8 changed files with 10 additions and 10 deletions

View File

@ -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()

View File

@ -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)
}

View File

@ -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()