Add documentation for Use ()

This commit is contained in:
Michael Muré 2020-08-18 22:14:09 +02:00 committed by GitHub
parent 81e0311edd
commit 8cfa4b4acf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -37,6 +37,14 @@ type FParseErrWhitelist flag.ParseErrorsWhitelist
// definition to ensure usability. // definition to ensure usability.
type Command struct { type Command struct {
// Use is the one-line usage message. // Use is the one-line usage message.
// Recommended syntax is as follow:
// [ ] identifies an optional argument. Arguments that are not enclosed in brackets are required.
// ... indicates that you can specify multiple values for the previous argument.
// | indicates mutually exclusive information. You can use the argument to the left of the separator or the
// argument to the right of the separator. You cannot use both arguments in a single use of the command.
// { } delimits a set of mutually exclusive arguments when one of the arguments is required. If the arguments are
// optional, they are enclosed in brackets ([ ]).
// Example: add [-F file | -D dir]... [-f format] profile
Use string Use string
// Aliases is an array of aliases that can be used instead of the first word in Use. // Aliases is an array of aliases that can be used instead of the first word in Use.