Skip to content

Commit e23c5f0

Browse files
committed
Connectors: Go tutorial - update per TW review
1 parent 19f4600 commit e23c5f0

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

doc/code_snippets/snippets/connectors/go/hello.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
)
1212

1313
func main() {
14+
// Connect to the database
1415
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
1516
defer cancel()
1617
dialer := tarantool.NetDialer{
@@ -28,7 +29,8 @@ func main() {
2829
return
2930
}
3031

31-
// Interacting with the database
32+
// Interact with the database
33+
// ...
3234
// Insert data
3335
tuples := [][]interface{}{
3436
{1, "Roxette", 1986},

doc/how-to/getting_started_go.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Connecting from Go
55

66
**Examples on GitHub**: `sample_db <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/connectors/instances.enabled/sample_db>`_, `go <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/connectors/go>`_
77

8-
The tutorial shows how to use the 2.x version of the `go-tarantool <https://github.com/tarantool/go-tarantool>`__ library to create a Go application that connects to a remote Tarantool instance, performs CRUD operations, and executes a stored procedure.
8+
The tutorial shows how to use the `go-tarantool <https://github.com/tarantool/go-tarantool>`__ 2.x library to create a Go application that connects to a remote Tarantool instance, performs CRUD operations, and executes a stored procedure.
99
You can find the full package documentation here: `Client in Go for Tarantool <https://pkg.go.dev/github.com/tarantool/go-tarantool/v2>`__.
1010

1111

@@ -24,7 +24,7 @@ Sample database configuration
2424
Starting a sample database application
2525
--------------------------------------
2626

27-
Before creating and starting a client Go application, you need to run the :ref:`sample_db <getting_started_net_box_sample_db>` application using ``tt start``:
27+
Before creating and starting a client Go application, you need to run the :ref:`sample_db <getting_started_net_box_sample_db>` application using :ref:`tt start <tt-start>`:
2828

2929
.. code-block:: console
3030
@@ -94,19 +94,19 @@ Connecting to the database
9494

9595
.. literalinclude:: /code_snippets/snippets/connectors/go/hello.go
9696
:language: go
97-
:start-after: func main()
98-
:end-at: // Interacting with the database
97+
:start-at: // Connect to the database
98+
:end-before: // Insert data
9999
:dedent:
100100

101101
This code establishes a connection to a running Tarantool instance on behalf of ``sampleuser``.
102102
The ``conn`` object can be used to make CRUD requests and execute stored procedures.
103103

104104

105105

106-
.. _getting_started_go_using_data_operations:
106+
.. _getting_started_go_manipulating_data:
107107

108-
Using data operations
109-
~~~~~~~~~~~~~~~~~~~~~
108+
Manipulating data
109+
~~~~~~~~~~~~~~~~~
110110

111111
.. _getting_started_go_inserting_data:
112112

@@ -272,8 +272,8 @@ Starting a client application
272272
273273
.. _getting_started-go-comparison:
274274

275-
Feature comparison
276-
------------------
275+
Go connectors feature comparison
276+
--------------------------------
277277

278278
There are two more connectors from the open-source community:
279279

doc/how-to/getting_started_net_box.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This section describes the :ref:`configuration <configuration_file>` of a sample
2424

2525
- The configuration contains one instance that listens for incoming requests on the ``127.0.0.1:3301`` address.
2626
- ``sampleuser`` has :ref:`privileges <authentication-owners_privileges>` to select and modify data in the ``bands`` space and execute the ``get_bands_older_than`` stored function. This user can be used to connect to the instance remotely.
27-
- ``myapp.lua`` defines how data is stored in a database and includes a stored function.
27+
- ``myapp.lua`` defines the data model and a stored function.
2828

2929
The ``myapp.lua`` file looks as follows:
3030

0 commit comments

Comments
 (0)