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

Method Int

command.go:523–536  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

521}
522
523func (cmd *Cmd) Int() (int, error) {
524 if cmd.err != nil {
525 return 0, cmd.err
526 }
527 switch val := cmd.val.(type) {
528 case int64:
529 return int(val), nil
530 case string:
531 return strconv.Atoi(val)
532 default:
533 err := fmt.Errorf("redis: unexpected type=%T for Int", val)
534 return 0, err
535 }
536}
537
538func (cmd *Cmd) Int64() (int64, error) {
539 if cmd.err != nil {

Callers 10

RandomMethod · 0.45
isEmptyValueFunction · 0.45
commands_test.goFile · 0.45
ExampleClient_WatchFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
ProcessPipelineHookMethod · 0.45
RecordErrorMethod · 0.45

Calls

no outgoing calls

Tested by 1

ExampleClient_WatchFunction · 0.36