browser-flag: wrapped bool type denotes browser on/off flag. (#3963)

Statically typed BrowserFlag prevents any arbitrary string value
usage. The wrapped bool marshals/unmarshals JSON according to the
typed value ie string value "on" represents boolean true and "off" as
boolean false.
This commit is contained in:
Bala FA
2017-03-27 00:30:27 +05:30
committed by Harshavardhana
parent 565ac4c861
commit 6e63904048
7 changed files with 253 additions and 57 deletions

View File

@@ -886,7 +886,7 @@ func migrateV13ToV14() error {
}
// Set the new browser parameter to true by default
srvConfig.Browser = "on"
srvConfig.Browser = true
if err = quick.Save(configFile, srvConfig); err != nil {
return fmt.Errorf("Failed to migrate config from %s to %s. %v", cv13.Version, srvConfig.Version, err)