forked from External/ergo
expose various go internals as a DEBUG command
This commit is contained in:
parent
f482b6b82f
commit
3b56b5bf42
4 changed files with 67 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ var (
|
|||
parseCommandFuncs = map[StringCode]parseCommandFunc{
|
||||
AWAY: NewAwayCommand,
|
||||
CAP: NewCapCommand,
|
||||
DEBUG: NewDebugCommand,
|
||||
ISON: NewIsOnCommand,
|
||||
JOIN: NewJoinCommand,
|
||||
KICK: NewKickCommand,
|
||||
|
|
@ -863,3 +864,18 @@ func NewNamesCommand(args []string) (editableCommand, error) {
|
|||
}
|
||||
return cmd, nil
|
||||
}
|
||||
|
||||
type DebugCommand struct {
|
||||
BaseCommand
|
||||
subCommand string
|
||||
}
|
||||
|
||||
func NewDebugCommand(args []string) (editableCommand, error) {
|
||||
if len(args) == 0 {
|
||||
return nil, NotEnoughArgsError
|
||||
}
|
||||
|
||||
return &DebugCommand{
|
||||
subCommand: strings.ToUpper(args[0]),
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue