summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-22 15:23:04 -0600
committerJeff Carr <[email protected]>2025-02-22 15:23:04 -0600
commit9f9a52312e6e9538e7ec4c0eefbe46aace352fd3 (patch)
tree7f22f8040ab9b133b83ca08a78902ee9aac89b5c /main.go
parent6e111ba862d3f9b9179e9ac71468b6c4f25cbf20 (diff)
first gui for virtigo! easy with proto pb tables
Diffstat (limited to 'main.go')
-rw-r--r--main.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/main.go b/main.go
index e40c6e8..ce6d446 100644
--- a/main.go
+++ b/main.go
@@ -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()
}