use common debugger code
This commit is contained in:
parent
ff091d0c81
commit
47fad87e32
2
Makefile
2
Makefile
|
@ -27,7 +27,7 @@ log:
|
|||
tail -f /tmp/witgui.* /tmp/guilogfile
|
||||
|
||||
gocui: build
|
||||
./control-panel-digitalocean -gui gocui
|
||||
./control-panel-digitalocean -gui gocui >/tmp/control-panel-droplet 2>&1
|
||||
|
||||
quiet:
|
||||
./control-panel-digitalocean >/tmp/witgui.log.stderr 2>&1
|
||||
|
|
14
argv.go
14
argv.go
|
@ -1,14 +0,0 @@
|
|||
package main
|
||||
|
||||
/*
|
||||
this enables command line options from other packages like 'gui' and 'log'
|
||||
*/
|
||||
|
||||
import (
|
||||
arg "github.com/alexflint/go-arg"
|
||||
)
|
||||
|
||||
|
||||
func init() {
|
||||
arg.MustParse()
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package main
|
||||
|
||||
/*
|
||||
enables GUI options and the debugger in your application
|
||||
*/
|
||||
|
||||
import (
|
||||
"go.wit.com/dev/alexflint/arg"
|
||||
"go.wit.com/lib/debugger"
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
var args struct {
|
||||
}
|
||||
|
||||
func init() {
|
||||
arg.MustParse(&args)
|
||||
|
||||
if debugger.ArgDebug() {
|
||||
log.Info("cmd line --debugger == true")
|
||||
go func() {
|
||||
log.Sleep(2)
|
||||
debugger.DebugWindow()
|
||||
}()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue