Documentation ¶
Overview ¶
Package command defines the subcommands available to the dice CLI.
Index ¶
- func EvalCommand(c *cli.Context) error
- func Field(i interface{}, field string) interface{}
- func Output(c *cli.Context, i interface{}) (string, error)
- func OutputField(c *cli.Context, i interface{}, field string) (string, error)
- func REPLCommand(c *cli.Context) error
- func RollCommand(c *cli.Context) error
- func ServerCommand(c *cli.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalCommand ¶
EvalCommand will evaluate the first argument it is provided as a math.DiceExpression and print the result or return any errors during evaluation.
func Field ¶
func Field(i interface{}, field string) interface{}
Field extracts a field from a given interface.
func OutputField ¶
OutputField prints a given field from a provided interface using a provided context's format.
func REPLCommand ¶
REPLCommand is a command that will initiate a dice REPL.
func RollCommand ¶
RollCommand is a command that will create a Dice from the first argument passed and roll it, printing the result.
func ServerCommand ¶
ServerCommand is a command that will initialize a DRAAS HTTP server.
The server routines themselves should be split into a separate dice/server package.
Types ¶
This section is empty.