Skip to content

Commit 0eb2fe9

Browse files
calvnarekkas
authored andcommitted
exampels: indent with spaces on Cassandra example (#88)
Signed-off-by: Calvin Leung Huang <[email protected]>
1 parent f0e8b64 commit 0eb2fe9

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

examples/Cassandra.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ if err != nil {
88
}
99

1010
options := &dockertest.RunOptions{
11-
Repository: "cassandra",
12-
Tag: "latest",
13-
Mounts: []string{"/tmp/local-cassandra:/etc/cassandra"},
14-
}
11+
Repository: "cassandra",
12+
Tag: "latest",
13+
Mounts: []string{"/tmp/local-cassandra:/etc/cassandra"},
14+
}
1515

1616
resource, err := pool.RunWithOptions(options)
1717
if err != nil {
@@ -23,21 +23,21 @@ port, _ := strconv.Atoi(resource.GetPort("9042/tcp"))
2323

2424
// exponential backoff-retry, because the application in the container might not be ready to accept connections yet
2525
if err := pool.Retry(func() error {
26-
clusterConfig := gocql.NewCluster(retURL)
27-
clusterConfig.Authenticator = gocql.PasswordAuthenticator{
28-
Username: "cassandra",
29-
Password: "cassandra",
30-
}
31-
clusterConfig.ProtoVersion = 4
32-
clusterConfig.Port = port
33-
log.Printf("%v", clusterConfig.Port)
26+
clusterConfig := gocql.NewCluster(retURL)
27+
clusterConfig.Authenticator = gocql.PasswordAuthenticator{
28+
Username: "cassandra",
29+
Password: "cassandra",
30+
}
31+
clusterConfig.ProtoVersion = 4
32+
clusterConfig.Port = port
33+
log.Printf("%v", clusterConfig.Port)
3434

35-
session, err := clusterConfig.CreateSession()
36-
if err != nil {
37-
return fmt.Errorf("error creating session: %s", err)
38-
}
35+
session, err := clusterConfig.CreateSession()
36+
if err != nil {
37+
return fmt.Errorf("error creating session: %s", err)
38+
}
3939
defer session.Close()
40-
return nil
40+
return nil
4141
}); err != nil {
4242
log.Fatalf("Could not connect to docker: %s", err)
4343
}

0 commit comments

Comments
 (0)