control-panel-dns/argv.go

34 lines
526 B
Go
Raw Permalink Normal View History

2024-02-12 21:42:02 -06:00
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"
)
2024-11-16 00:06:21 -06:00
var argv args
type args struct {
Daemon bool `arg:"--daemon" help:"run without a gui"`
2024-02-12 21:42:02 -06:00
}
func init() {
2024-11-16 00:06:21 -06:00
arg.MustParse(&argv)
2024-02-12 21:42:02 -06:00
if debugger.ArgDebug() {
log.Info("cmd line --debugger == true")
go func() {
log.Sleep(2)
debugger.DebugWindow()
}()
}
}
2024-11-16 00:06:21 -06:00
func (args) Version() string {
return "go-clone " + VERSION + " Built on " + BUILDTIME
}