diff --git a/version.go b/version.go index 140bae819..4da6b845e 100644 --- a/version.go +++ b/version.go @@ -27,7 +27,13 @@ package gocql import "runtime/debug" const ( - mainModule = "github.com/gocql/gocql" + defaultDriverName = "github.com/apache/cassandra-gocql-driver" + + // This string MUST have this value since we explicitly test against the + // current main package returned by runtime/debug below. Also note the + // package name used here may change in a future (2.x) release; in that case + // this constant will be updated as well. + mainPackage = "github.com/gocql/gocql" ) var driverName string @@ -38,8 +44,8 @@ func init() { buildInfo, ok := debug.ReadBuildInfo() if ok { for _, d := range buildInfo.Deps { - if d.Path == mainModule { - driverName = mainModule + if d.Path == mainPackage { + driverName = defaultDriverName driverVersion = d.Version if d.Replace != nil { driverName = d.Replace.Path