summaryrefslogtreecommitdiff
path: root/debugger.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-18 16:48:16 -0500
committerJeff Carr <[email protected]>2025-09-18 16:48:16 -0500
commit56297940f4c51f5ed48caefa06240baab2d51a60 (patch)
tree2a18775781b7d20c7cdff23ef5bc9e1547065c79 /debugger.go
parent87751f7c720b9af79bc5c5679b1f003ba5fae4ed (diff)
this is how things are actually supposed to work
Diffstat (limited to 'debugger.go')
-rw-r--r--debugger.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/debugger.go b/debugger.go
index 5d1298a..6176ae4 100644
--- a/debugger.go
+++ b/debugger.go
@@ -40,3 +40,20 @@ func Debugger() {
CHAN = log.NewFlag("CHAN", true, full, short, "chan() test code output")
WARN = log.NewFlag("WARN", true, full, short, "should warn the user")
}
+
+// Versioned is the interface that the destination struct should implement to
+// make a version string appear at the top of the help message.
+type Appnamed interface {
+ // Version returns the version string that will be printed on a line by itself
+ // at the top of the help message.
+ Appname() string
+}
+
+// Described is the interface that the destination struct should implement to
+func newTest(tmp interface{}) {
+ if tmp, ok := tmp.(Appnamed); ok {
+ myAuto.appName = tmp.Appname()
+ } else {
+ panic("you need to make the function argv.Appname()")
+ }
+}