Ver Fonte

etcdserver: set -> existsSet

Blake Mizerany há 11 anos atrás
pai
commit
2d3cef2496
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      etcdserver2/server.go

+ 2 - 2
etcdserver2/server.go

@@ -119,9 +119,9 @@ func (s *Server) apply(ctx context.Context, e raft.Entry) (*store.Event, error)
 	case "POST":
 	case "POST":
 		return s.st.Create(r.Path, r.Dir, r.Val, true, expr)
 		return s.st.Create(r.Path, r.Dir, r.Val, true, expr)
 	case "PUT":
 	case "PUT":
-		exists, set := getBool(r.PrevExists)
+		exists, existsSet := getBool(r.PrevExists)
 		switch {
 		switch {
-		case set:
+		case existsSet:
 			if exists {
 			if exists {
 				return s.st.Update(r.Path, r.Val, expr)
 				return s.st.Update(r.Path, r.Val, expr)
 			} else {
 			} else {