Skip to content

Commit bbd7ad2

Browse files
Merge pull request #3382 from keks/feat/command.run-docs
Add docs for `"commands".Command.Run`
2 parents bc21966 + 1a3fa80 commit bbd7ad2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

commands/command.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,14 @@ type HelpText struct {
5252
// Command is a runnable command, with input arguments and options (flags).
5353
// It can also have Subcommands, to group units of work into sets.
5454
type Command struct {
55-
Options []Option
56-
Arguments []Argument
57-
PreRun func(req Request) error
55+
Options []Option
56+
Arguments []Argument
57+
PreRun func(req Request) error
58+
59+
// Run is the function that processes the request to generate a response.
60+
// Note that when executing the command over the HTTP API you can only read
61+
// after writing when using multipart requests. The request body will not be
62+
// available for reading after the HTTP connection has been written to.
5863
Run Function
5964
PostRun Function
6065
Marshalers map[EncodingType]Marshaler

0 commit comments

Comments
 (0)