update: Re-write update command.

This commit is contained in:
Harshavardhana
2015-11-25 21:06:29 -08:00
parent b429bd7ceb
commit 3f9e1c1e68
3 changed files with 90 additions and 118 deletions
+2 -4
View File
@@ -47,14 +47,12 @@ func mainConfigVersion(ctx *cli.Context) {
// convert interface{} back to its original struct
newConf := config
type Version struct {
Value string `json:"value"`
}
type Version string
if globalJSONFlag {
tB, e := json.Marshal(
struct {
Version Version `json:"version"`
}{Version: Version{newConf.Version}},
}{Version: Version(newConf.Version)},
)
fatalIf(probe.NewError(e), "Unable to construct version string.", nil)
Println(string(tB))