Skip to content

Commit

Permalink
Merge identical switch cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mdawar committed Jul 23, 2023
1 parent 28a86b1 commit fc6ee62
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cli/kv_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,7 @@ func (c *kvCommand) watchAction(_ *fisk.ParseContext) error {
}

switch res.Operation() {
case nats.KeyValueDelete:
fmt.Printf("[%s] %s %s > %s\n", f(res.Created()), color.RedString(c.strForOp(res.Operation())), res.Bucket(), res.Key())
case nats.KeyValuePurge:
case nats.KeyValueDelete, nats.KeyValuePurge:
fmt.Printf("[%s] %s %s > %s\n", f(res.Created()), color.RedString(c.strForOp(res.Operation())), res.Bucket(), res.Key())
case nats.KeyValuePut:
fmt.Printf("[%s] %s %s > %s: %s\n", f(res.Created()), color.GreenString(c.strForOp(res.Operation())), res.Bucket(), res.Key(), res.Value())
Expand Down

0 comments on commit fc6ee62

Please sign in to comment.