forked from External/ergo
don't overwrite base command
This commit is contained in:
parent
04f881a617
commit
55d3d6e946
3 changed files with 6 additions and 7 deletions
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
type editableCommand interface {
|
||||
Command
|
||||
SetBase(*Client)
|
||||
SetClient(*Client)
|
||||
}
|
||||
|
||||
type parseCommandFunc func([]string) (editableCommand, error)
|
||||
|
|
@ -42,8 +42,8 @@ func (command *BaseCommand) Client() *Client {
|
|||
return command.client
|
||||
}
|
||||
|
||||
func (command *BaseCommand) SetBase(c *Client) {
|
||||
*command = BaseCommand{c}
|
||||
func (command *BaseCommand) SetClient(c *Client) {
|
||||
command.client = c
|
||||
}
|
||||
|
||||
func (command *BaseCommand) Source() Identifier {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue