MCPcopy
hub / github.com/redis/go-redis / toString

Function toString

command.go:513–521  ·  view source on GitHub ↗
(val interface{})

Source from the content-addressed store, hash-verified

511}
512
513func toString(val interface{}) (string, error) {
514 switch val := val.(type) {
515 case string:
516 return val, nil
517 default:
518 err := fmt.Errorf("redis: unexpected type=%T for String", val)
519 return "", err
520 }
521}
522
523func (cmd *Cmd) Int() (int, error) {
524 if cmd.err != nil {

Callers 2

TextMethod · 0.85
StringSliceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected