Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package template provides usage templates to render help menus.
Index ¶
Constants ¶
      View Source
      
  const Usage = `` /* 561-byte string literal not displayed */
    Usage is the text template for a single command.
Variables ¶
      View Source
      
  var RootUsage = fmt.Sprintf("{{h1 \"Commands\"}}{{ $cmds := .Commands }}{{$groups := mkSlice \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" }}{{range $group := $groups }} \n", group.GettingStarted, group.Develop, group.Release, group.Extend, group.Settings) + ` {{h2 $group}}{{$groupCmds := (filterCmdsByGroup $cmds $group)}} {{- range $j, $cmd := $groupCmds}}{{$lines := split $cmd.Short "\n"}} {{- range $i, $line := $lines}} {{if eq $i 0}}{{rpad $cmd.Name $cmd.NamePadding}} {{$line}} {{- else}}{{rpad "" $cmd.NamePadding}} {{$line}} {{- end}}{{end}}{{if and (gt (len $lines) 1) (ne (inc $j) (len $groupCmds))}} {{- end}}{{end}} {{end}}{{if .HasAvailableLocalFlags}} {{h1 "Flags"}} {{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}} {{h1 "Global Flags"}} {{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasExample}} {{h1 "Examples"}}{{code .Example}}{{end}} `
RootUsage is the text template for the root command.
Functions ¶
This section is empty.
Types ¶
This section is empty.
 Click to show internal directories. 
   Click to hide internal directories.