Updated examples and README for 2.0

Signed-off-by: Michał Matczuk <michal@scylladb.com>
This commit is contained in:
Michał Matczuk
2020-04-20 18:00:01 +02:00
committed by Michal Jan Matczuk
parent 227d152ac2
commit 0675f72f4f
9 changed files with 799 additions and 403 deletions

View File

@@ -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()
}