summaryrefslogtreecommitdiff
path: root/structs.go
blob: c406e8f44a1cd17bce1ffa0b3b6636add00d4788 (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
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
	all                               *Argvs                          // the protobuf for the current process
	last                              *Argv                           // the pb from the last time the user tried autocomplete
	id                                int                             // should be unique
	Argv                              func([]string)                  // the function for shell autocomplete
	initArgvFunc                      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            // calls go-arg.ParseFlags(flags)
	writeHelpForAutocompleteFunc      func(string, ...string) error   // notsure yet
	writeHelpForAutocompleteDebugFunc func(string, ...string) error   // notsure yet
	writeHelpFunc                     func() error                    // notsure yet
	writeHelpForSubcommandFunc        func(string) error              // 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
	Err                               error                           // store any errors from argv
	debug                             bool                            // is dubugging on?
	setupAuto                         bool                            // do shell autocomplete setup
	isAuto                            bool                            // try to do autocomplete

}