|
ca2828f33c
|
feat(commands) add ClientError(msg) helper and use it to return a fancy error to the client in the tour
@jbenet this exists now
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
|
2014-11-14 03:20:07 -08:00 |
|
|
047d2e2d62
|
cmd2: Marshaller -> Marshaler (see golang/encoding)
Also:
- map[cmds.EncodingType]cmds.Marshaller -> MarshalMap
cc @mappum @maybebtc
|
2014-11-14 03:20:05 -08:00 |
|
|
3b407c705d
|
commands: Ensure command output is correct type (if cmd.Type is set), resolves #321
|
2014-11-14 03:20:05 -08:00 |
|
|
646920b0dd
|
commands: Got rid of old helptext fields, use HelpText struct fields in helptext generator
|
2014-11-14 03:20:05 -08:00 |
|
|
fc7c199d6a
|
cmds/helptext: indent + newlines + synopsis
|
2014-11-14 03:20:00 -08:00 |
|
|
475f3f485b
|
commands: Added HelpText struct to organize different help text fields in Commands
|
2014-11-14 03:19:59 -08:00 |
|
|
81dbb23602
|
commands: Cleanup Requests after command execution returns
|
2014-11-14 03:17:43 -08:00 |
|
|
ea15bd6ffe
|
docs(commands) amend
|
2014-11-14 03:17:41 -08:00 |
|
|
e6f2de40dc
|
docs(commands) Type
|
2014-11-14 03:17:41 -08:00 |
|
|
7666f8880c
|
commands: Allow overriding helptext sections with hand-written strings
|
2014-11-14 03:17:41 -08:00 |
|
|
50751617b6
|
commands: s/j/valueIndex/
|
2014-11-14 03:17:40 -08:00 |
|
|
eedc2e9cc7
|
commands: s/lenRequired/numRequired/
|
2014-11-14 03:17:40 -08:00 |
|
|
3e507f7c9f
|
commands: Changed option accessor API (Request#Option now returns an OptionValue)
|
2014-11-14 03:17:38 -08:00 |
|
|
2029168e98
|
commands: Made Command run functions return (interface{}, error) instead of setting the values in the response
|
2014-11-14 03:17:37 -08:00 |
|
|
351ed9589a
|
commands: Added 'Description' fields to Command, Argument, Option
|
2014-11-14 03:17:33 -08:00 |
|
|
fecb434ab4
|
commands: Fixed arg validation bug
|
2014-11-14 03:17:27 -08:00 |
|
|
116041c5ec
|
commands: Fixed argument value/definition mapping
|
2014-11-14 03:17:26 -08:00 |
|
|
2a1116cec8
|
commands: Allow overriding marshaller for any encoding type
|
2014-11-04 02:04:50 -08:00 |
|
|
0149f65c6c
|
commands: Replaced 'Formatter' with 'Marshaller'
|
2014-11-04 02:04:50 -08:00 |
|
|
bc6938dc08
|
commands: Cleaned up argument validation
|
2014-11-04 02:04:49 -08:00 |
|
|
75649f3d49
|
commands: Moved argument checking into a Command method, fail early when parsing commands
|
2014-11-04 02:04:49 -08:00 |
|
|
e8d0cbff1d
|
commands: Check argument validity when running commands
|
2014-11-04 02:04:49 -08:00 |
|
|
827f1dd0b0
|
commands: Changed Request arguments to a []interface{}
|
2014-11-04 02:04:48 -08:00 |
|
|
83b2ba00e9
|
commands: Removed Command#Private field
|
2014-11-04 02:04:48 -08:00 |
|
|
460387fc3b
|
commands: Added 'Private' field to Command
|
2014-11-04 02:04:47 -08:00 |
|
|
4911dc069a
|
refactor(commands) swap argument order to match Http(w, r) idiom
|
2014-11-04 02:04:47 -08:00 |
|
|
ef290faa88
|
commands: Added a Type field for defining output struct formats
|
2014-11-04 02:04:46 -08:00 |
|
|
38f8f1c279
|
commands: Added a Format function to Command, for creating human-readable output based on a Response
|
2014-11-04 02:04:46 -08:00 |
|
|
ca44d0da2c
|
commands: Removed Command#Register and exported Subcommands so subcommands can be defined statically
|
2014-10-21 18:05:54 -07:00 |
|
|
6ff98df9c1
|
commands: Do command collision check in GetOptions
|
2014-10-21 18:00:26 -07:00 |
|
|
dd84a3eb44
|
commands: Got rid of Response#Stream() in favor of setting value to a io.Reader
|
2014-10-21 16:15:06 -07:00 |
|
|
4896123c14
|
commands: Export command Run function
|
2014-10-21 15:24:39 -07:00 |
|
|
7bd7ed6d52
|
commands: Added output stream field to Response
|
2014-10-20 14:38:36 -07:00 |
|
|
b10fc2cc50
|
turned req + res into interfaces
|
2014-10-20 11:49:07 -07:00 |
|
|
92528ba764
|
Sub -> Subcommand
|
2014-10-20 07:55:23 -07:00 |
|
|
84fa7bc46d
|
AddOptionNames func
|
2014-10-20 07:53:55 -07:00 |
|
|
09d2277f0a
|
f -> run, Function type.
|
2014-10-20 07:53:54 -07:00 |
|
|
7673ce6f65
|
fmt, lint, + vet commands/
|
2014-10-20 07:53:14 -07:00 |
|
|
4f06c6fdba
|
commands: Formatted code
|
2014-10-20 07:04:54 -07:00 |
|
|
d2176c05eb
|
commands: Added Command#Get
|
2014-10-20 07:04:54 -07:00 |
|
|
4af61ad994
|
commands: Added Command#Resolve
|
2014-10-20 07:04:54 -07:00 |
|
|
c575b5087a
|
commands: Added option value conversion, and moved option validation logic into Request#convertOptions
|
2014-10-20 07:04:53 -07:00 |
|
|
793a8de9c2
|
commands: Refactored to make Request contain command path
|
2014-10-20 07:04:53 -07:00 |
|
|
1b35615824
|
commands: Made Command#GetOption method, for getting all options for a given command path
|
2014-10-20 07:04:52 -07:00 |
|
|
43670971d8
|
commands: Formatted code
|
2014-10-20 07:04:52 -07:00 |
|
|
b2ee05a0be
|
commands: Updated Command to use Response for output rather than (interface{}, error)
|
2014-10-20 07:04:50 -07:00 |
|
|
d7e9afc801
|
commands: Use global options when registering and calling commands
|
2014-10-20 07:04:50 -07:00 |
|
|
5b18844c06
|
commands: Check for option name collisions
|
2014-10-20 07:04:50 -07:00 |
|
|
dd2a10509f
|
commands: Implemented Command
|
2014-10-20 07:04:49 -07:00 |
|