diff --git a/database/cassandra/cassandra.go b/database/cassandra/cassandra.go index 74eecc98e..88d3eeea6 100644 --- a/database/cassandra/cassandra.go +++ b/database/cassandra/cassandra.go @@ -125,6 +125,14 @@ func (c *Cassandra) Open(url string) (database.Driver, error) { } cluster.ProtoVersion = protoversion } + if len(u.Query().Get("port")) > 0 { + var port int + port, err = strconv.Atoi(u.Query().Get("port")) + if err != nil { + return nil, err + } + cluster.Port = port + } if len(u.Query().Get("timeout")) > 0 { var timeout time.Duration timeout, err = time.ParseDuration(u.Query().Get("timeout"))