Add documentation

This commit is contained in:
Derek Parker
2014-05-21 10:23:14 -05:00
parent 2d8cc08513
commit a67f21fee4
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,5 @@
// Package command implements functions for responding to user
// input and dispatching to appropriate backend commands.
package command
import (
@ -21,6 +23,8 @@ func DebugCommands() *Commands {
return &Commands{cmds}
}
// Register custom commands. Expects cf to be a func of type cmdfunc,
// returning only an error.
func (c *Commands) Register(cmdstr string, cf cmdfunc) {
c.cmds[cmdstr] = cf
}