cleanup and simplify

This commit is contained in:
Ali Abbas 2014-12-06 13:08:35 +01:00
parent a84a88b3f5
commit fc73a5a53e
1 changed files with 4 additions and 2 deletions

View File

@ -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
} }
} }