feat(config): restructures config
This commit is contained in:
parent
65a393f8d6
commit
f0be9c42d3
10 changed files with 71 additions and 59 deletions
|
|
@ -92,7 +92,7 @@ func mv(cmd *cobra.Command, args []string) error {
|
|||
readonly: false,
|
||||
sync: false,
|
||||
transact: func(tx *badger.Txn, k []byte) error {
|
||||
if !force && config.WarnOnOverwrite {
|
||||
if !force && config.Key.AlwaysPromptOverwrite {
|
||||
if _, err := tx.Get(k); err == nil {
|
||||
return fmt.Errorf("cannot move '%s': '%s' already exists > run with --force to overwrite", fromSpec.Key, toSpec.Key)
|
||||
} else if err != badger.ErrKeyNotFound {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue