File: help.go

package info (click to toggle)
pat 0.19.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,296 kB
  • sloc: javascript: 3,891; sh: 124; makefile: 11
file content (19 lines) | stat: -rw-r--r-- 282 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package cli

import (
	"github.com/spf13/pflag"
)

func HelpHandle(args []string) {
	// Print usage for the specified command
	arg := args[0]
	for _, cmd := range Commands {
		if cmd.Str == arg {
			cmd.PrintUsage()
			return
		}
	}

	// Fallback to main help text
	pflag.Usage()
}