Removed the function and data structure for generating man pages
This commit is contained in:
parent
1bea6dcbf0
commit
22a56266c5
31
help.go
31
help.go
@ -44,32 +44,6 @@ OPTIONS:
|
||||
{{end}}
|
||||
`
|
||||
|
||||
var ManPageTemplate = `.\" -*-Nroff-*-
|
||||
.\"
|
||||
.TH "{{.Name}}" 1 "{{.Compiled.Day}} {{.Compiled.Month}} {{.Compiled.Year}}" "" ""
|
||||
.SH NAME
|
||||
{{.Name}} \- {{.Usage}}
|
||||
.SH SYNOPSIS
|
||||
.B {{.Name}}
|
||||
.nf
|
||||
command {{.Name}} [command options] [arguments...]
|
||||
.fi
|
||||
.SH COMMANDS
|
||||
.nf
|
||||
{{range .Commands}}{{.Name}}{{with .ShortName}}, {{.}}{{end}}{{ "\t" }}{{.Usage}}
|
||||
{{end}}
|
||||
.fi
|
||||
.SH OPTIONS
|
||||
.nf
|
||||
{{range .Flags}}{{.}}
|
||||
{{end}}
|
||||
.fi
|
||||
.SH VERSION
|
||||
.B {{.Version}}
|
||||
.SH AUTHOR
|
||||
.B {{.Name}} was written by {{.Author}} <{{.Email}}>
|
||||
`
|
||||
|
||||
var helpCommand = Command{
|
||||
Name: "help",
|
||||
ShortName: "h",
|
||||
@ -89,11 +63,6 @@ func ShowAppHelp(c *Context) {
|
||||
printHelp(AppHelpTemplate, c.App)
|
||||
}
|
||||
|
||||
// Generates (prints) man page for the App
|
||||
func GenerateManPage(c *Context) {
|
||||
printHelp(ManPageTemplate, c.App)
|
||||
}
|
||||
|
||||
// Prints help for the given command
|
||||
func ShowCommandHelp(c *Context, command string) {
|
||||
for _, c := range c.App.Commands {
|
||||
|
Loading…
Reference in New Issue
Block a user