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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user