diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -10,6 +10,7 @@ import ( "time" "go.wit.com/dev/alexflint/arg" + "go.wit.com/gui" pb "go.wit.com/lib/protobuf/virtbuf" "go.wit.com/lib/virtigolib" "go.wit.com/log" @@ -21,12 +22,8 @@ var Version string var resources embed.FS func main() { - if os.Getenv("VIRTIGO_HOME") == "" { - homeDir, _ := os.UserHomeDir() - fullpath := filepath.Join(homeDir, ".config/virtigo") - os.Setenv("VIRTIGO_HOME", fullpath) - } var pp *arg.Parser + gui.InitArg() pp = arg.MustParse(&argv) if pp == nil { @@ -34,9 +31,11 @@ func main() { os.Exit(0) } - // if argv.Daemon { - // log.DaemonMode(true) - // } + if os.Getenv("VIRTIGO_HOME") == "" { + homeDir, _ := os.UserHomeDir() + fullpath := filepath.Join(homeDir, ".config/virtigo") + os.Setenv("VIRTIGO_HOME", fullpath) + } // set defaults me.unstable = time.Now() // initialize the grid as unstable @@ -176,5 +175,6 @@ func main() { } // sit here - startHTTP() + go startHTTP() + doGui() } |
