MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / stringLRangeData

Function stringLRangeData

cmd/client/list.go:125–142  ·  view source on GitHub ↗

CLI for LRange command

(c *grumble.Context)

Source from the content-addressed store, hash-verified

123
124// CLI for LRange command
125func stringLRangeData(c *grumble.Context) error {
126 key := c.Args.String("key")
127 start := c.Args.Int("start")
128 stop := c.Args.Int("stop")
129 if key == "" {
130 fmt.Println("key is empty")
131 return nil
132 }
133
134 values, err := newClient().LRange(key, start, stop)
135 if err != nil {
136 fmt.Println("LRange data error:", err)
137 return err
138 }
139
140 fmt.Println("LRange data success:", values)
141 return nil
142}
143
144// CLI for LLen command
145func stringLLenData(c *grumble.Context) error {

Callers

nothing calls this directly

Calls 3

newClientFunction · 0.85
LRangeMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected