chore(set): removes some placeholders: will rework at a later date

This commit is contained in:
Lewis Wynne 2025-12-19 16:56:55 +00:00
parent 9c82ee70d4
commit 181218ef6a

View file

@ -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
}