github.com/mithrandie/csvq@v1.18.1/lib/cli/help.go (about)

     1  package cli
     2  
     3  var appHHelpTemplate = `Name:
     4     {{.Name}}{{if .Usage}} - {{.Usage}}{{end}}
     5  
     6       https://mithrandie.github.io/csvq/
     7  
     8  Usage:
     9     {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[options]{{end}}{{if .Commands}} [subcommand]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
    10  
    11  Version:
    12     Version {{.Version}}{{end}}{{end}}{{if .Description}}
    13  
    14  Description:
    15     {{.Description}}{{end}}{{if len .Authors}}
    16  
    17  Author{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
    18     {{range $index, $author := .Authors}}{{if $index}}
    19     {{end}}{{$author}}{{end}}{{end}}{{if .VisibleCommands}}
    20  
    21  Subcommands:{{range .VisibleCategories}}{{if .Name}}
    22     {{.Name}}:{{end}}{{range .VisibleCommands}}
    23     {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
    24  
    25  Options:
    26     {{range $index, $option := .VisibleFlags}}{{if $index}}
    27     {{end}}{{$option}}{{end}}
    28  
    29  Parameters:
    30     Timezone
    31        Local | UTC
    32     Import Format
    33        CSV | TSV | FIXED | JSON | JSONL | LTSV
    34     Export Format
    35        CSV | TSV | FIXED | JSON | JSONL | LTSV | GFM | ORG | BOX | TEXT
    36     Import Character Encodings
    37        AUTO | UTF8 | UTF8M | UTF16 | UTF16BE | UTF16LE | UTF16BEM | UTF16LEM | SJIS
    38     Export Character Encodings
    39        UTF8 | UTF8M | UTF16 | UTF16BE | UTF16LE | UTF16BEM | UTF16LEM | SJIS
    40     Line Break
    41        CRLF | CR | LF
    42     JSON Escape Type
    43        BACKSLASH | HEX | HEXALL{{end}}{{if .Copyright}}
    44  
    45  Copyright:
    46     {{.Copyright}}{{end}}
    47  
    48  `
    49  
    50  var commandHelpTemplate = `Name:
    51     {{.HelpName}} - {{.Usage}}
    52  
    53  Usage:
    54     csvq [options] {{.Name}}{{if .VisibleFlags}} [subcommand options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{if .Category}}
    55  
    56  Category:
    57     {{.Category}}{{end}}{{if .Description}}
    58  
    59  Description:
    60     {{.Description}}{{end}}{{if .VisibleFlags}}
    61  
    62  Options:
    63     {{range .VisibleFlags}}{{.}}
    64     {{end}}{{end}}
    65  `