Source File
util.go
Belonging Package
github.com/go-redis/redis/v8/internal
package internal
import (
)
func ( context.Context, time.Duration) error {
return WithSpan(, "sleep", func( context.Context) error {
:= time.NewTimer()
defer .Stop()
select {
case <-.C:
return nil
case <-.Done():
return .Err()
}
})
}
func ( string) string {
if isLower() {
return
}
:= make([]byte, len())
for := range {
:= []
if >= 'A' && <= 'Z' {
+= 'a' - 'A'
}
[] =
}
return util.BytesToString()
}
func ( string) bool {
for := 0; < len(); ++ {
:= []
if >= 'A' && <= 'Z' {
return false
}
}
return true
}
func ( error) error {
, := .(interface {
() error
})
if ! {
return nil
}
return .()
}
func ( context.Context, string, func(context.Context) error) error {
if !trace.SpanFromContext().IsRecording() {
return ()
}
, := global.Tracer("github.com/go-redis/redis").Start(, )
defer .End()
return ()
}
func ( context.Context, error) error {
if != proto.Nil {
trace.SpanFromContext().RecordError(, )
}
return
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |