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

Method StringSlice

command.go:651–666  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

649}
650
651func (cmd *Cmd) StringSlice() ([]string, error) {
652 slice, err := cmd.Slice()
653 if err != nil {
654 return nil, err
655 }
656
657 ss := make([]string, len(slice))
658 for i, iface := range slice {
659 val, err := toString(iface)
660 if err != nil {
661 return nil, err
662 }
663 ss[i] = val
664 }
665 return ss, nil
666}
667
668func (cmd *Cmd) Int64Slice() ([]int64, error) {
669 slice, err := cmd.Slice()

Callers 1

topKFunction · 0.80

Calls 2

SliceMethod · 0.95
toStringFunction · 0.85

Tested by

no test coverage detected