var templateFuncs … var initializers … var finalizers … const defaultPrefixMatching … const defaultCommandSorting … const defaultCaseInsensitive … const defaultTraverseRunHooks … var EnablePrefixMatching … var EnableCommandSorting … var EnableCaseInsensitive … var EnableTraverseRunHooks … var MousetrapHelpText … var MousetrapDisplayDuration … // AddTemplateFunc adds a template function that's available to Usage and Help // template generation. func AddTemplateFunc(name string, tmplFunc interface{ … } // AddTemplateFuncs adds multiple template functions that are available to Usage and // Help template generation. func AddTemplateFuncs(tmplFuncs template.FuncMap) { … } // OnInitialize sets the passed functions to be run when each command's // Execute method is called. func OnInitialize(y ...func()) { … } // OnFinalize sets the passed functions to be run when each command's // Execute method is terminated. func OnFinalize(y ...func()) { … } // Gt takes two types and checks whether the first type is greater than the second. In case of types Arrays, Chans, // Maps and Slices, Gt will compare their lengths. Ints are compared directly while strings are first parsed as // ints and then compared. func Gt(a interface{ … } // Eq takes two types and checks whether they are equal. Supported types are int and string. Unsupported types will panic. func Eq(a interface{ … } func trimRightSpace(s string) string { … } // appendIfNotPresent will append stringToAppend to the end of s, but only if it's not yet present in s. func appendIfNotPresent(s, stringToAppend string) string { … } // rpad adds padding to the right of a string. func rpad(s string, padding int) string { … } // tmpl executes the given template text on data, writing the result to w. func tmpl(w io.Writer, text string, data interface{ … } // ld compares two strings and returns the levenshtein distance between them. func ld(s, t string, ignoreCase bool) int { … } func stringInSlice(a string, list []string) bool { … } // CheckErr prints the msg with the prefix 'Error:' and exits with error code 1. If the msg is nil, it does nothing. func CheckErr(msg interface{ … } // WriteStringAndCheck writes a string into a buffer, and checks if the error is not nil. func WriteStringAndCheck(b io.StringWriter, s string) { … }