summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interface.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/interface.go b/interface.go
index d6d4a63..09461b1 100644
--- a/interface.go
+++ b/interface.go
@@ -4,29 +4,29 @@ package prep
// 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 {
+type appnameI interface {
// Version returns the version string that will be printed on a line by itself
// at the top of the help message.
Appname() string
}
-type AutoFuncd interface {
+type autoFuncI interface {
// Version returns the version string that will be printed on a line by itself
// at the top of the help message.
DoAutoComplete(*Auto)
}
-type Buildtimed interface {
+type buildtimeI interface {
Buildtime() (string, string)
}
-type Examplesd interface {
+type examplesI interface {
// Version returns the version string that will be printed on a line by itself
// at the top of the help message.
Examples() string
}
-type ExitI interface {
+type exitI interface {
// Version returns the version string that will be printed on a line by itself
// at the top of the help message.
Exit()
@@ -34,31 +34,31 @@ type ExitI interface {
// Described is the interface that the destination struct should implement to
func findAppInfo(tmp interface{}) {
- if tmp, ok := tmp.(Appnamed); ok {
+ if tmp, ok := tmp.(appnameI); ok {
myAuto.appName = tmp.Appname()
} else {
panic("you must define in your app the function: (argv) func Appname() string")
}
- if tmp, ok := tmp.(Buildtimed); ok {
+ if tmp, ok := tmp.(buildtimeI); ok {
myAuto.buildtime = tmp.Buildtime
} else {
// panic("you need to make the function argv.Appname()")
}
- if tmp, ok := tmp.(Examplesd); ok {
+ if tmp, ok := tmp.(examplesI); ok {
myAuto.examples = tmp.Examples
} else {
// panic("you need to make the function argv.Appname()")
}
- if tmp, ok := tmp.(AutoFuncd); ok {
+ if tmp, ok := tmp.(autoFuncI); ok {
myAuto.autoFunc = tmp.DoAutoComplete
} else {
// panic("you need to make the function argv.DoAutoComplete()")
}
- if tmp, ok := tmp.(ExitI); ok {
+ if tmp, ok := tmp.(exitI); ok {
myAuto.appExit = tmp.Exit
} else {
// panic("you need to make the function argv.Exit()")