refactor: ensure all property-handling functions return an error
This will allow upstream functions to handle errors in the most appropriate manner
This commit is contained in:
@@ -23,10 +23,14 @@ func main() {
|
||||
}
|
||||
if proxy.IsAppProxyEnabled(appName) {
|
||||
common.LogVerboseQuiet("Setting %s network property 'bind-all-interfaces' to false")
|
||||
common.PropertyWrite("network", appName, "bind-all-interfaces", "false")
|
||||
if err := common.PropertyWrite("network", appName, "bind-all-interfaces", "false"); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
} else {
|
||||
common.LogVerboseQuiet("Setting %s network property 'bind-all-interfaces' to true")
|
||||
common.PropertyWrite("network", appName, "bind-all-interfaces", "true")
|
||||
if err := common.PropertyWrite("network", appName, "bind-all-interfaces", "true"); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,8 @@ func main() {
|
||||
flag.Parse()
|
||||
appName := flag.Arg(0)
|
||||
|
||||
common.PropertyWrite("network", appName, "bind-all-interfaces", "false")
|
||||
err := common.PropertyWrite("network", appName, "bind-all-interfaces", "false")
|
||||
if err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,8 @@ func main() {
|
||||
flag.Parse()
|
||||
appName := flag.Arg(0)
|
||||
|
||||
common.PropertyDestroy("network", appName)
|
||||
err := common.PropertyDestroy("network", appName)
|
||||
if err != nil {
|
||||
common.LogFail(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user