summaryrefslogtreecommitdiff
path: root/verifyApplication.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-25 21:37:10 -0500
committerJeff Carr <[email protected]>2025-10-25 21:37:10 -0500
commitcfee0dad2418f8e800d15edd3e6b32cebd1119dc (patch)
tree1a04efc1fb679c18a2694f20880bf5d5989bf678 /verifyApplication.go
parentc4808b62d90562eb901e37f242ee866dc07d07c6 (diff)
dump lots more stuff
Diffstat (limited to 'verifyApplication.go')
-rw-r--r--verifyApplication.go114
1 files changed, 1 insertions, 113 deletions
diff --git a/verifyApplication.go b/verifyApplication.go
index 6b0291a..f38bec7 100644
--- a/verifyApplication.go
+++ b/verifyApplication.go
@@ -17,36 +17,6 @@ func verifyApplication(tmp interface{}) {
panic("you must define in your app the function: func (args) MustParse() error")
}
- if tmp, ok := tmp.(writeHelpForAutocompleteI); ok {
- me.writeHelpForAutocompleteFunc = tmp.WriteHelpForAutocomplete
- } else {
- helpWriteHelpForAutocomplete()
- }
-
- if tmp, ok := tmp.(writeHelpForAutocompleteDebugI); ok {
- me.writeHelpForAutocompleteDebugFunc = tmp.WriteHelpForAutocompleteDebug
- } else {
- helpWriteHelpForAutocompleteDebug()
- }
-
- if tmp, ok := tmp.(writeHelpForSubcommandI); ok {
- me.writeHelpForSubcommandFunc = tmp.WriteHelpForSubcommand
- } else {
- helpWriteHelpForSubcommand()
- }
-
- if tmp, ok := tmp.(writeHelpI); ok {
- me.writeHelpFunc = tmp.WriteHelp
- } else {
- helpWriteHelp()
- }
-
- if tmp, ok := tmp.(parseFlagsI); ok {
- me.parseFlagsFunc = tmp.ParseFlags
- } else {
- parseFlagsHelp()
- }
-
if tmp, ok := tmp.(initGuiI); ok {
me.initGuiFunc = tmp.InitGui
if err := tmp.InitGui(); err != nil {
@@ -71,7 +41,7 @@ func verifyApplication(tmp interface{}) {
if tmp, ok := tmp.(sendCompletionStringsI); ok {
me.autoFunc = tmp.SendCompletionStrings
} else {
- // panic("you need to make the function argv.DoAutoComplete()")
+ // panic("you need to make the function argv.SendCompletionStrings()")
}
if tmp, ok := tmp.(exitI); ok {
@@ -91,26 +61,6 @@ type mustParseI interface {
MustParse() error
}
-type parseFlagsI interface {
- ParseFlags() error
-}
-
-type writeHelpForAutocompleteI interface {
- WriteHelpForAutocomplete() error
-}
-
-type writeHelpForAutocompleteDebugI interface {
- WriteHelpForAutocompleteDebug() error
-}
-
-type writeHelpForSubcommandI interface {
- WriteHelpForSubcommand() error
-}
-
-type writeHelpI interface {
- WriteHelp() error
-}
-
type initGuiI interface {
// Version returns the version string that will be printed on a line by itself
// at the top of the help message.
@@ -159,65 +109,3 @@ type exitI interface {
// allows a custom app Exit()
Exit()
}
-
-func helpWriteHelpForSubcommand() {
- fmt.Println("")
- fmt.Println("// add this funcgion: this will print the help")
- fmt.Println("func (args) WriteHelpForSubcommandArgv() error {")
- fmt.Println(" me.pp.WriteHelpForSubcommandArgv(me.argv)")
- fmt.Println(" return nil")
- fmt.Println("}")
- fmt.Println("")
- fmt.Println("cp ~/go/src/go.wit.com/apps/forge/argv.template.go .")
- panic("copy the argv.template.go file from forge")
-}
-
-func helpWriteHelp() {
- fmt.Println("")
- fmt.Println("// add this funcgion: this will print the help")
- fmt.Println("func (args) WriteHelp() error {")
- fmt.Println(" me.pp.WriteHelpArgv(me.argv)")
- fmt.Println(" return nil")
- fmt.Println("}")
- fmt.Println("")
-
- panic("best to just copy the argv.template.go file from forge")
-}
-
-func helpWriteHelpForAutocompleteDebug() {
- fmt.Println("")
- fmt.Println("// this will print the help for the subcmd")
- fmt.Println("func (args) WriteHelpForAutocompleteDebugArgv() error {")
- fmt.Println(" return argvpp.WriteHelpForAutocompleteArgv(me.argv)")
- fmt.Println("}")
- fmt.Println("")
- fmt.Println("cp ~/go/src/go.wit.com/apps/forge/argv.template.go .")
-
- panic("best to just copy the argv.template.go file from forge")
-}
-
-// func (p *Parser) WriteHelpForAutocomplete(stderr io.Writer, stdout io.Writer, partial string, subcommand ...string) error {
-// me.pp.WriteHelpForAutocomplete(Stderr, Stdout, partial, cmd...)
-func helpWriteHelpForAutocomplete() {
- fmt.Println("")
- fmt.Println("// this will print the help for the subcmd")
- fmt.Println("func (args) WriteHelpForAutocompleteArgv() error {")
- fmt.Println(" return argvpp.WriteHelpForAutocompleteArgv(me.argv)")
- fmt.Println("}")
- fmt.Println("")
- fmt.Println("Just copy the argv.template.go file from forge")
- fmt.Println("")
-
- panic("you must define this function in your application code")
-}
-
-func parseFlagsHelp() {
- fmt.Println("")
- fmt.Println("// this function will send the current argv PB to go-args for parsing")
- fmt.Println("func (args) ParseFlags() error {")
- fmt.Println(" arg.ParseFlags(me.argv, &argv)")
- fmt.Println("}")
- fmt.Println("")
-
- panic("you must define in your app the function: func (args) ParseFlags([]string) error")
-}