diff options
| author | Jeff Carr <[email protected]> | 2025-03-09 07:07:41 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-09 07:07:41 -0500 |
| commit | 66000419bf15cb255e436db44a2a74bf104484e3 (patch) | |
| tree | 819327cff4db2f2e0e78e6f0caa575ea8e54968d /main.go | |
| parent | eaedaded622316d3b59c2f3765cd2362e96ce54c (diff) | |
preliminary gui
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -4,20 +4,26 @@ package main import ( + "embed" "io" "net" "os" "time" "go.wit.com/dev/alexflint/arg" + "go.wit.com/gui" "go.wit.com/log" ) var VERSION string var BUILDTIME string +//go:embed resources/* +var resources embed.FS + func main() { var pp *arg.Parser + gui.InitArg() pp = arg.MustParse(&argv) if pp == nil { @@ -25,8 +31,12 @@ func main() { os.Exit(0) } - me := new(gusconf) + me = new(gusconf) me.pollDelay = 10 * time.Second + me.portmaps = NewPortmaps() + p := new(Portmap) + p.Connect = "testing:323" + me.portmaps.Append(p) if argv.Daemon { // turn off timestamps for STDOUT (systemd adds them) @@ -39,7 +49,11 @@ func main() { go listen3000() - startHTTP() + go startHTTP() + if gui.NoGui() { + os.Exit(0) + } + doGui() } func listen3000() { |
