etcdserver: move error to errors.go

Both server.go and cluster.go are using defined ErrX. Move error
to errors.go
This commit is contained in:
Xiang Li
2014-12-30 14:45:55 -08:00
parent 2c21ac656b
commit 803c38f448
3 changed files with 54 additions and 28 deletions

View File

@ -29,7 +29,6 @@ import (
"strings"
"sync"
etcdErr "github.com/coreos/etcd/error"
"github.com/coreos/etcd/pkg/flags"
"github.com/coreos/etcd/pkg/types"
"github.com/coreos/etcd/raft/raftpb"
@ -405,8 +404,3 @@ func ValidateClusterAndAssignIDs(local *Cluster, existing *Cluster) error {
}
return nil
}
func isKeyNotFound(err error) bool {
e, ok := err.(*etcdErr.Error)
return ok && e.ErrorCode == etcdErr.EcodeKeyNotFound
}