File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ type ConfigField struct {
27
27
28
28
const (
29
29
configBoolOptionName = "bool"
30
- configJsonOptionName = "json"
30
+ configJSONOptionName = "json"
31
31
)
32
32
33
33
var ConfigCmd = & cmds.Command {
@@ -60,7 +60,7 @@ Set the value of the 'Datastore.Path' key:
60
60
},
61
61
Options : []cmdkit.Option {
62
62
cmdkit .BoolOption (configBoolOptionName , "Set a boolean value." ),
63
- cmdkit .BoolOption (configJsonOptionName , "Parse stringified JSON." ),
63
+ cmdkit .BoolOption (configJSONOptionName , "Parse stringified JSON." ),
64
64
},
65
65
Run : func (req cmds.Request , res cmds.Response ) {
66
66
args := req .Arguments ()
@@ -92,7 +92,7 @@ Set the value of the 'Datastore.Path' key:
92
92
if len (args ) == 2 {
93
93
value := args [1 ]
94
94
95
- if parseJson , _ , _ := req .Option (configJsonOptionName ).Bool (); parseJson {
95
+ if parseJSON , _ , _ := req .Option (configJSONOptionName ).Bool (); parseJSON {
96
96
var jsonVal interface {}
97
97
if err := json .Unmarshal ([]byte (value ), & jsonVal ); err != nil {
98
98
err = fmt .Errorf ("failed to unmarshal json. %s" , err )
You can’t perform that action at this time.
0 commit comments