Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #14 from karimra/set-type-default
Browse files Browse the repository at this point in the history
make json a default type for set update/replace
  • Loading branch information
karimra authored May 10, 2020
2 parents f541948 + 10bade5 commit de89ce2
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions cmd/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,10 @@ var setCmd = &cobra.Command{
}
} else {
var vType string
if inlineUpdates {
if len(updateTypes) > i {
vType = updateTypes[i]
} else {
vType = "json"
}
if len(updateTypes) > i {
vType = updateTypes[i]
} else {
vType = "json"
}
switch vType {
case "json":
Expand Down Expand Up @@ -263,12 +261,10 @@ var setCmd = &cobra.Command{
}
} else {
var vType string
if inlineReplaces {
if len(replaceTypes) > i {
vType = replaceTypes[i]
} else {
vType = "json"
}
if len(replaceTypes) > i {
vType = replaceTypes[i]
} else {
vType = "json"
}
switch vType {
case "json":
Expand Down

0 comments on commit de89ce2

Please sign in to comment.