Rename noConsole to hideConsole
This avoids the double negative of having noConsole = false to represent not hiding the console. It is also consistent with the action performed by osutils.
This commit is contained in:
parent
b014967550
commit
1dc894087c
@ -199,7 +199,7 @@ type RuntimeOptions struct {
|
|||||||
upgradeTo string
|
upgradeTo string
|
||||||
noBrowser bool
|
noBrowser bool
|
||||||
browserOnly bool
|
browserOnly bool
|
||||||
noConsole bool
|
hideConsole bool
|
||||||
logFile string
|
logFile string
|
||||||
auditEnabled bool
|
auditEnabled bool
|
||||||
verbose bool
|
verbose bool
|
||||||
@ -263,7 +263,7 @@ func parseCommandLineOptions() RuntimeOptions {
|
|||||||
flag.StringVar(&options.logFile, "logfile", options.logFile, "Log file name (use \"-\" for stdout)")
|
flag.StringVar(&options.logFile, "logfile", options.logFile, "Log file name (use \"-\" for stdout)")
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
// Allow user to hide the console window
|
// Allow user to hide the console window
|
||||||
flag.BoolVar(&options.noConsole, "no-console", false, "Hide console window")
|
flag.BoolVar(&options.hideConsole, "no-console", false, "Hide console window")
|
||||||
}
|
}
|
||||||
|
|
||||||
longUsage := fmt.Sprintf(extraUsage, baseDirs["config"], debugFacilities())
|
longUsage := fmt.Sprintf(extraUsage, baseDirs["config"], debugFacilities())
|
||||||
@ -286,7 +286,7 @@ func main() {
|
|||||||
os.Setenv("STGUIAPIKEY", options.guiAPIKey)
|
os.Setenv("STGUIAPIKEY", options.guiAPIKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
if options.noConsole {
|
if options.hideConsole {
|
||||||
osutil.HideConsole()
|
osutil.HideConsole()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user