cleanup and simplify
This commit is contained in:
parent
0117529781
commit
a542df954f
|
@ -1,6 +1,7 @@
|
||||||
package consul
|
package consul
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
@ -164,8 +165,9 @@ func (c *consulFSM) applyKVSOperation(buf []byte, index uint64) interface{} {
|
||||||
return act
|
return act
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
c.logger.Printf("[WARN] consul.fsm: Invalid KVS operation '%s'", req.Op)
|
err := errors.New(fmt.Sprintf("Invalid KVS operation '%s'", req.Op))
|
||||||
return fmt.Errorf("Invalid KVS operation '%s'", req.Op)
|
c.logger.Printf("[WARN] consul.fsm: %v", err)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue