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

Function stringIncrBy

cmd/client/string.go:132–146  ·  view source on GitHub ↗
(c *grumble.Context)

Source from the content-addressed store, hash-verified

130}
131
132func stringIncrBy(c *grumble.Context) error {
133 key := c.Args.String("key")
134 amount := c.Args.Int64("amount")
135 if key == "" {
136 fmt.Println("key is empty")
137 return nil
138 }
139 err := newClient().IncrBy(key, amount)
140 if err != nil {
141 fmt.Println("incrby operation error: ", err)
142 return err
143 }
144 fmt.Println("IncrBy operation success")
145 return nil
146}
147
148func stringIncrByFloat(c *grumble.Context) error {
149 key := c.Args.String("key")

Callers

nothing calls this directly

Calls 3

newClientFunction · 0.85
IncrByMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected