chore(set): removes some placeholders: will rework at a later date
This commit is contained in:
parent
9c82ee70d4
commit
181218ef6a
1 changed files with 0 additions and 14 deletions
14
cmd/set.go
14
cmd/set.go
|
|
@ -26,7 +26,6 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/dgraph-io/badger/v4"
|
||||
"github.com/spf13/cobra"
|
||||
|
|
@ -123,8 +122,6 @@ func set(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
valSummary := summarizeValue(value)
|
||||
_ = fmt.Sprintf("set %s: %s", spec.Display(), valSummary) // placeholder for future messaging
|
||||
return autoSync()
|
||||
}
|
||||
|
||||
|
|
@ -134,14 +131,3 @@ func init() {
|
|||
setCmd.Flags().DurationP("ttl", "t", 0, "Expire the key after the provided duration (e.g. 24h, 30m)")
|
||||
setCmd.Flags().BoolP("interactive", "i", false, "Prompt before overwriting an existing key")
|
||||
}
|
||||
|
||||
func summarizeValue(v []byte) string {
|
||||
if !utf8.Valid(v) {
|
||||
return "(binary)"
|
||||
}
|
||||
s := string(v)
|
||||
if len(s) > 80 {
|
||||
return s[:80] + "..."
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue