summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go18
1 files changed, 16 insertions, 2 deletions
diff --git a/main.go b/main.go
index e5ea927..825301b 100644
--- a/main.go
+++ b/main.go
@@ -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() {