summaryrefslogtreecommitdiff
path: root/structs.go
blob: 4ec64cb21096c459bc20c36c5b93e86a1a410738 (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
package argvpb

// try this struct out (?)
var me *AutoArgs

// this is a work in progress
type AutoArgs struct {
	pb                       *Argv                           // the protobuf for the current process
	id                       int                             // should be unique
	Argv                     func([]string)                  // the function for shell autocomplete
	initArgv                 func() (string, string, string) // this is required. gets APPNAME, BUILDTIME & VERSION
	initGuiFunc              func() error                    // this is required for 'gui' args to work
	mustParseFunc            func() error                    // calls go-arg.MustParse()
	parseFlagsFunc           func([]string) error            // notsure yet
	writeHelp                func()                          // notsure yet
	writeHelpForSubcommand   func(string)                    // notsure yet
	writeHelpForAutocomplete func()                          // notsure yet
	examples                 func() string                   // some examples
	appExit                  func()                          // app Exit()
	buildtime                func() (string, string)         // some examples
	autoFunc                 func(*Argv)                     // also a function for autocomplete
	guiFunc                  func() error                    // enables Gui functions
	ARGNAME                  string                          // a good way to track the name of the binary ?
	VERSION                  string
	BUILDTIME                string
	err                      error // store any errors from argv
	// hidden    bool                    // don't update the toolkits when it's hidden
	// pp                     *arg.Parser                     // for parsing the command line args.  Yay to alexf lint!
}