summaryrefslogtreecommitdiff
path: root/debugger.go
diff options
context:
space:
mode:
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 5b1e2a9..5fe28f9 100644
--- a/debugger.go
+++ b/debugger.go
@@ -55,6 +55,12 @@ type AutoFuncd interface {
DoAutoComplete(*Auto)
}
+type Examplesd interface {
+ // Version returns the version string that will be printed on a line by itself
+ // at the top of the help message.
+ Examples() string
+}
+
// Described is the interface that the destination struct should implement to
func findAppInfo(tmp interface{}) {
if tmp, ok := tmp.(Appnamed); ok {
@@ -63,6 +69,12 @@ func findAppInfo(tmp interface{}) {
panic("you need to make the function argv.Appname()")
}
+ if tmp, ok := tmp.(Examplesd); ok {
+ myAuto.examples = tmp.Examples
+ } else {
+ panic("you need to make the function argv.Appname()")
+ }
+
if tmp, ok := tmp.(AutoFuncd); ok {
myAuto.autoFunc = tmp.DoAutoComplete
} else {