Skip to content

Commit 371bf93

Browse files
committed
uodate json option name
License: MIT Signed-off-by: Kejie Zhang <[email protected]>
1 parent dee54b3 commit 371bf93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/commands/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type ConfigField struct {
2727

2828
const (
2929
configBoolOptionName = "bool"
30-
configJsonOptionName = "json"
30+
configJSONOptionName = "json"
3131
)
3232

3333
var ConfigCmd = &cmds.Command{
@@ -60,7 +60,7 @@ Set the value of the 'Datastore.Path' key:
6060
},
6161
Options: []cmdkit.Option{
6262
cmdkit.BoolOption(configBoolOptionName, "Set a boolean value."),
63-
cmdkit.BoolOption(configJsonOptionName, "Parse stringified JSON."),
63+
cmdkit.BoolOption(configJSONOptionName, "Parse stringified JSON."),
6464
},
6565
Run: func(req cmds.Request, res cmds.Response) {
6666
args := req.Arguments()
@@ -92,7 +92,7 @@ Set the value of the 'Datastore.Path' key:
9292
if len(args) == 2 {
9393
value := args[1]
9494

95-
if parseJson, _, _ := req.Option(configJsonOptionName).Bool(); parseJson {
95+
if parseJSON, _, _ := req.Option(configJSONOptionName).Bool(); parseJSON {
9696
var jsonVal interface{}
9797
if err := json.Unmarshal([]byte(value), &jsonVal); err != nil {
9898
err = fmt.Errorf("failed to unmarshal json. %s", err)

0 commit comments

Comments
 (0)