diff options
| author | Jeff Carr <[email protected]> | 2025-02-22 15:23:04 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-22 15:23:04 -0600 |
| commit | 9f9a52312e6e9538e7ec4c0eefbe46aace352fd3 (patch) | |
| tree | 7f22f8040ab9b133b83ca08a78902ee9aac89b5c /main.go | |
| parent | 6e111ba862d3f9b9179e9ac71468b6c4f25cbf20 (diff) | |
first gui for virtigo! easy with proto pb tables
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() } |
