fix global err names
add BulkPush and BulkPop
This commit is contained in:
parent
33d5ed706f
commit
80b7d7367f
4 changed files with 168 additions and 9 deletions
|
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
)
|
||||
|
||||
var InvalidActionName = errors.New("invalid action name")
|
||||
var ErrActionName = errors.New("invalid action name")
|
||||
|
||||
// Controllable is used for administration purposes.
|
||||
type Controllable interface {
|
||||
|
|
@ -42,7 +42,7 @@ func NewControl(host string, port int, password string) (Controllable, error) {
|
|||
|
||||
func (c ControlChannel) Trigger(action Action) (err error) {
|
||||
if IsActionValid(action) {
|
||||
return InvalidActionName
|
||||
return ErrActionName
|
||||
}
|
||||
err = c.write(fmt.Sprintf("TRIGGER %s", action))
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue