summaryrefslogtreecommitdiff
path: root/argv.go
blob: 83e333ab3ffc67fa6e38947a2ff19ac9afa81574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main

import (
	"go.wit.com/dev/alexflint/arg"
	"go.wit.com/gui"
)

/*
	this parses the command line arguements
	this enables command line options from other packages like 'gui' and 'log'
*/

var argv args

var APPNAME string = "basicwindow"

// sent via -ldflags
var VERSION string
var BUILDTIME string

// define your command line arguements here
type args struct {
	Demo string `arg:"positional"                   help:"this is just a demo"`
}

func (args) InitArgv() (string, string, string) {
	// "basicwindow", "2025/10/18", "v0.2.0"
	return APPNAME, BUILDTIME, VERSION
}

func (args) InitGui() error {
	// panic("got here")
	arg.Register(&gui.ArgvGui)
	// me.myGui = gui.New()
	return nil
}

func (a args) Description() string {
	return `
This basicwindow example demonstrates multiple windows
`
}