Skip to content

Commit 1031f32

Browse files
committed
usage documentation
1 parent 1aa3bae commit 1031f32

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ecdysis.go

+14
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ type Ecdysis struct {
3131
// Command is an interface that represents a command that can be decorated and
3232
// converted to a cobra.Command instance.
3333
type Command interface {
34+
// Usage is the one-line usage message.
35+
// Recommended syntax is as follows:
36+
// [ ] identifies an optional argument. Arguments that are not enclosed in
37+
// brackets are required.
38+
// ... indicates that you can specify multiple values for the previous
39+
// argument.
40+
// | indicates mutually exclusive information. You can use the argument
41+
// to the left of the separator or the argument to the right of the
42+
// separator. You cannot use both arguments in a single use of the
43+
// command.
44+
// { } delimits a set of mutually exclusive arguments when one of the
45+
// arguments is required. If the arguments are optional, they are
46+
// enclosed in brackets ([ ]).
47+
// Example: add [-F file | -D dir]... [-f format] profile
3448
Usage() string
3549
}
3650

0 commit comments

Comments
 (0)