Explorar o código

handle snapshot versions

Chris Bannister %!s(int64=10) %!d(string=hai) anos
pai
achega
2078ae3986
Modificáronse 1 ficheiros con 2 adicións e 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))
 	}