summaryrefslogtreecommitdiff
path: root/debugger.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-18 16:53:44 -0500
committerJeff Carr <[email protected]>2025-09-18 16:53:44 -0500
commit16d7cb2696fdad119fb58cadd6f2220ba8c7aad5 (patch)
tree4a71cc0b4c911e67851a74f77c220662334aa755 /debugger.go
parent56297940f4c51f5ed48caefa06240baab2d51a60 (diff)
geez. this makes things easierv0.0.8
Diffstat (limited to 'debugger.go')
-rw-r--r--debugger.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/debugger.go b/debugger.go
index 6176ae4..34ebbbb 100644
--- a/debugger.go
+++ b/debugger.go
@@ -49,6 +49,12 @@ type Appnamed interface {
Appname() string
}
+type AutoFuncd interface {
+ // Version returns the version string that will be printed on a line by itself
+ // at the top of the help message.
+ DoAutoComplete(*Auto)
+}
+
// Described is the interface that the destination struct should implement to
func newTest(tmp interface{}) {
if tmp, ok := tmp.(Appnamed); ok {
@@ -56,4 +62,10 @@ func newTest(tmp interface{}) {
} else {
panic("you need to make the function argv.Appname()")
}
+
+ if tmp, ok := tmp.(AutoFuncd); ok {
+ myAuto.autoFunc = tmp.DoAutoComplete
+ } else {
+ panic("you need to make the function argv.DoAutoComplete()")
+ }
}