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

Method Slice

command.go:639–649  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

637}
638
639func (cmd *Cmd) Slice() ([]interface{}, error) {
640 if cmd.err != nil {
641 return nil, cmd.err
642 }
643 switch val := cmd.val.(type) {
644 case []interface{}:
645 return val, nil
646 default:
647 return nil, fmt.Errorf("redis: unexpected type=%T for Slice", val)
648 }
649}
650
651func (cmd *Cmd) StringSlice() ([]string, error) {
652 slice, err := cmd.Slice()

Callers 13

StringSliceMethod · 0.95
Int64SliceMethod · 0.95
Uint64SliceMethod · 0.95
Float32SliceMethod · 0.95
Float64SliceMethod · 0.95
BoolSliceMethod · 0.95
ExampleClient_query_aggFunction · 0.80
ExampleClient_query_ftFunction · 0.80
ExampleClient_query_geoFunction · 0.80
ExampleClient_vectorsetFunction · 0.80
makeSliceNextElemFuncFunction · 0.80

Calls

no outgoing calls

Tested by 5

ExampleClient_query_aggFunction · 0.64
ExampleClient_query_ftFunction · 0.64
ExampleClient_query_geoFunction · 0.64
ExampleClient_vectorsetFunction · 0.64