start a 'subdomain' screen

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-30 01:23:26 -07:00
parent d96a94e977
commit c2406fee2b
2 changed files with 7 additions and 5 deletions

View File

@ -47,9 +47,9 @@ update:
config-make-readable:
cat ~/.config/cloud-control-panel.json |jq -r --tab
config-load-testconfig:
config-default-config:
echo loading the test config
cp resources/cloud-control-panel.json ~/.config/cloud-control-panel.json
./cloud-control-panel --defaultconfig
config-delete:
echo deleting your current config

View File

@ -68,6 +68,7 @@ var customUsage = func() {
fmt.Println(os.Args[0] + " --hostname test.hostname.wit.com")
fmt.Println("")
}
var defaultconfig *bool
func parseFlags() {
var hostname string
@ -81,6 +82,7 @@ func parseFlags() {
height := flag.Int ("height", 0, "Height of the Window")
width := flag.Int ("width", 0, "Width of the Window")
debug = flag.Bool("debug", false, "Enable debugging")
defaultconfig = flag.Bool("defaultconfig", false, "Use the default config file")
debugtable = flag.Bool("debugtable", false, "Enable GUI table debugging")
// Set the output if something fails to stdout rather than stderr
@ -110,8 +112,8 @@ func parseFlags() {
}
// never allow these to be set in the config file
config.Debug = *debug
config.Debugtable = *debugtable
config.Debug = *debug
config.Debugtable = *debugtable
}
// Convert a Protobuf to JSON
@ -208,7 +210,7 @@ func parseConfig() {
if (config.Accounts == nil) {
log.Println("loadConfigFile() config.Accounts == nil")
log.Println("If debugging is on, should load default config here")
if (config.Debug) {
if (*defaultconfig == true) {
log.Println("Debugging is on, loading debug config accounts")
tmp := loadDefaultConfig()
config.Accounts = tmp.Accounts