mirror of https://github.com/v2ray/v2ray-core
18 lines
228 B
Go
18 lines
228 B
Go
|
package command
|
||
|
|
||
|
import (
|
||
|
"errors"
|
||
|
"io"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
ErrorNoSuchCommand = errors.New("No such command.")
|
||
|
)
|
||
|
|
||
|
type Command interface {
|
||
|
Marshal(io.Writer) (int, error)
|
||
|
Unmarshal([]byte) error
|
||
|
}
|
||
|
|
||
|
type CommandCreator func() Command
|