Sfoglia il codice sorgente

panic if invalid consistency provided

Adam Weiner 10 anni fa
parent
commit
868223bd79
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      frame.go

+ 4 - 2
frame.go

@@ -192,14 +192,16 @@ func ParseConsistency(s string) Consistency {
 		return Three
 	case "QUORUM":
 		return Quorum
+	case "ALL":
+		return All;
 	case "LOCAL_QUORUM":
 		return LocalQuorum
 	case "EACH_QUORUM":
 		return EachQuorum
 	case "LOCAL_ONE":
 		return LocalOne
-	default: // "ALL"
-		return All
+	default:
+		panic("invalid consistency: " + s)
 	}
 }