Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
bbd7ad21
Commit
bbd7ad21
authored
Nov 14, 2016
by
Jeromy Johnson
Committed by
GitHub
Nov 14, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3382 from keks/feat/command.run-docs
Add docs for `"commands".Command.Run`
parents
bc21966b
1a3fa80f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
commands/command.go
commands/command.go
+8
-3
No files found.
commands/command.go
View file @
bbd7ad21
...
@@ -52,9 +52,14 @@ type HelpText struct {
...
@@ -52,9 +52,14 @@ type HelpText struct {
// Command is a runnable command, with input arguments and options (flags).
// Command is a runnable command, with input arguments and options (flags).
// It can also have Subcommands, to group units of work into sets.
// It can also have Subcommands, to group units of work into sets.
type
Command
struct
{
type
Command
struct
{
Options
[]
Option
Options
[]
Option
Arguments
[]
Argument
Arguments
[]
Argument
PreRun
func
(
req
Request
)
error
PreRun
func
(
req
Request
)
error
// Run is the function that processes the request to generate a response.
// Note that when executing the command over the HTTP API you can only read
// after writing when using multipart requests. The request body will not be
// available for reading after the HTTP connection has been written to.
Run
Function
Run
Function
PostRun
Function
PostRun
Function
Marshalers
map
[
EncodingType
]
Marshaler
Marshalers
map
[
EncodingType
]
Marshaler
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment