Updated examples and README for 2.0
Signed-off-by: Michał Matczuk <michal@scylladb.com>
This commit is contained in:
committed by
Michal Jan Matczuk
parent
227d152ac2
commit
0675f72f4f
@@ -28,13 +28,14 @@ var (
|
||||
|
||||
var initOnce sync.Once
|
||||
|
||||
// CreateSession creates a new gocql session from flags.
|
||||
// CreateSession creates a new gocqlx session from flags.
|
||||
func CreateSession(tb testing.TB) gocqlx.Session {
|
||||
cluster := createCluster()
|
||||
cluster := CreateCluster()
|
||||
return createSessionFromCluster(cluster, tb)
|
||||
}
|
||||
|
||||
func createCluster() *gocql.ClusterConfig {
|
||||
// CreateCluster creates gocql ClusterConfig from flags.
|
||||
func CreateCluster() *gocql.ClusterConfig {
|
||||
if !flag.Parsed() {
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user