Removed the function and data structure for generating man pages

main
Alexander Rødseth 11 years ago
parent 1bea6dcbf0
commit 22a56266c5

@ -44,32 +44,6 @@ OPTIONS:
{{end}} {{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{ var helpCommand = Command{
Name: "help", Name: "help",
ShortName: "h", ShortName: "h",
@ -89,11 +63,6 @@ func ShowAppHelp(c *Context) {
printHelp(AppHelpTemplate, c.App) 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 // Prints help for the given command
func ShowCommandHelp(c *Context, command string) { func ShowCommandHelp(c *Context, command string) {
for _, c := range c.App.Commands { for _, c := range c.App.Commands {

Loading…
Cancel
Save