Explorar el Código

handle snapshot versions

Chris Bannister hace 10 años
padre
commit
2078ae3986
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      host_source.go

+ 2 - 1
host_source.go

@@ -30,7 +30,8 @@ type cassVersion struct {
 }
 
 func (c *cassVersion) UnmarshalCQL(info TypeInfo, data []byte) error {
-	v := strings.Split(string(data), ".")
+	version := strings.TrimSuffix(string(data), "-SNAPSHOT")
+	v := strings.Split(version, ".")
 	if len(v) != 3 {
 		return fmt.Errorf("invalid schema_version: %v", string(data))
 	}