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

Function stringDecrBy

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

Source from the content-addressed store, hash-verified

177}
178
179func stringDecrBy(c *grumble.Context) error {
180 key := c.Args.String("key")
181 amount := c.Args.Int64("amount")
182 if key == "" {
183 fmt.Println("key is empty")
184 return nil
185 }
186 err := newClient().DecrBy(key, amount)
187 if err != nil {
188 fmt.Println("decrby operation error: ", err)
189 return err
190 }
191 fmt.Println("DecrBy operation success")
192 return nil
193}
194
195func stringExists(c *grumble.Context) error {
196 key := c.Args.String("key")

Callers

nothing calls this directly

Calls 3

newClientFunction · 0.85
DecrByMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected