Skip to content

Commit c0e5870

Browse files
committed
Connect/Go: Copy editing
1 parent 4b10cd7 commit c0e5870

File tree

4 files changed

+46
-25
lines changed

4 files changed

+46
-25
lines changed

docs/connect/go/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ The `pgx` and `pq` packages have been validated with CrateDB.
1313
`pq` is in maintenance mode, so their authors recommend using
1414
`pgx` which is under active development.
1515

16+
The `KSQL` package is a convenience wrapper that also uses the
17+
`pgx` library to connect to CrateDB.
18+
19+
:::{rubric} Overview
20+
:::
21+
1622
:::{toctree}
1723
:hidden:
1824
pgx

docs/connect/go/ksql.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,6 @@ func main() {
7474
}
7575
```
7676

77-
:::{include} ../_cratedb.md
78-
:::
79-
```shell
80-
go mod init github.com/cratedb-guide/connect/go/ksql
81-
go mod tidy
82-
go run example.go
83-
```
84-
8577
:::{rubric} CrateDB Cloud
8678
:::
8779

@@ -92,5 +84,18 @@ your environment.
9284
dbURL := "postgresql://admin:password@testcluster.cratedb.net:5432/doc?sslmode=require"
9385
```
9486

87+
:::{rubric} Quickstart example
88+
:::
89+
90+
Create the file `example.go` including the synopsis code shared above.
91+
92+
:::{include} ../_cratedb.md
93+
:::
94+
```shell
95+
go mod init github.com/cratedb-guide/connect/go/ksql
96+
go mod tidy
97+
go run example.go
98+
```
99+
95100

96101
[KSQL]: https://github.com/VinGarcia/ksql

docs/connect/go/pgx.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ func main() {
6161
}
6262
```
6363

64-
:::{include} ../_cratedb.md
65-
:::
66-
```shell
67-
go mod init github.com/cratedb-guide/connect/go/pgx
68-
go mod tidy
69-
go run example.go
70-
```
71-
7264
:::{rubric} CrateDB Cloud
7365
:::
7466

@@ -79,7 +71,20 @@ your environment.
7971
conn, _ := pgx.Connect(ctx, "postgresql://admin:password@testcluster.cratedb.net:5432/doc?sslmode=require")
8072
```
8173

82-
:::{rubric} Example
74+
:::{rubric} Quickstart example
75+
:::
76+
77+
Create the file `example.go` including the synopsis code shared above.
78+
79+
:::{include} ../_cratedb.md
80+
:::
81+
```shell
82+
go mod init github.com/cratedb-guide/connect/go/pgx
83+
go mod tidy
84+
go run example.go
85+
```
86+
87+
:::{rubric} Full example
8388
:::
8489

8590
:::{card}

docs/connect/go/pq.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ func main() {
4141
}
4242
```
4343

44-
:::{include} ../_cratedb.md
45-
:::
46-
```shell
47-
go mod init github.com/cratedb-guide/connect/go/pq
48-
go mod tidy
49-
go run example.go
50-
```
51-
5244
:::{rubric} CrateDB Cloud
5345
:::
5446

@@ -59,5 +51,18 @@ your environment.
5951
connStr := "postgresql://admin:password@testcluster.cratedb.net:5432/doc?sslmode=require"
6052
```
6153

54+
:::{rubric} Quickstart example
55+
:::
56+
57+
Create the file `example.go` including the synopsis code shared above.
58+
59+
:::{include} ../_cratedb.md
60+
:::
61+
```shell
62+
go mod init github.com/cratedb-guide/connect/go/pq
63+
go mod tidy
64+
go run example.go
65+
```
66+
6267

6368
[pq]: https://github.com/lib/pq

0 commit comments

Comments
 (0)