add a -nogui option for debugging
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
4863991462
commit
24ae9a3033
4
Makefile
4
Makefile
|
@ -2,6 +2,10 @@ run:
|
|||
go build
|
||||
./cloud-control-panel
|
||||
|
||||
nogui:
|
||||
go build
|
||||
./cloud-control-panel -nogui
|
||||
|
||||
gaper:
|
||||
# 'gaper' is a simple and smart golang tool that just rebuilds every time you change a file
|
||||
# go get -u github.com/maxcnunes/gaper
|
||||
|
|
|
@ -33,7 +33,7 @@ var customUsage = func() {
|
|||
|
||||
func parseFlags() {
|
||||
var version string
|
||||
var race bool
|
||||
var nogui bool
|
||||
var hostname string
|
||||
var width int
|
||||
var height int
|
||||
|
@ -44,7 +44,7 @@ func parseFlags() {
|
|||
flag.IntVar (&width, "width", 400, "Width of the Window")
|
||||
flag.IntVar (&height, "height", 600, "Height of the Window")
|
||||
|
||||
flag.BoolVar (&race, "race", race, "Use race detector")
|
||||
flag.BoolVar (&nogui, "nogui", nogui, "Do not display the GUI")
|
||||
|
||||
// Set the output if something fails to stdout rather than stderr
|
||||
flag.CommandLine.SetOutput(os.Stdout)
|
||||
|
@ -61,6 +61,7 @@ func parseFlags() {
|
|||
config.Set("width", width)
|
||||
config.Set("height", height)
|
||||
config.Set("hostname", hostname)
|
||||
config.Set("nogui", nogui)
|
||||
}
|
||||
|
||||
func parseConfig() {
|
||||
|
@ -101,4 +102,8 @@ func parseConfig() {
|
|||
hostname := config.String("cloud." + account + ".hostname")
|
||||
fmt.Println(hostname, port, proto)
|
||||
}
|
||||
|
||||
if (config.String("nogui") == "true") {
|
||||
log.Println("DO NOT DISPLAY THE GUI")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue