Skip to content

Commit

Permalink
suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
javierdelapuente committed Oct 22, 2024
1 parent b7f5653 commit b22fabf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions docs/reference/extensions/go-framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ go-framework
The Go extension streamlines the process of building Go application
rocks.

The extension builds and copies the Go binary file to the rock,
inside the ``/app`` directory. By default, the base ``bare`` is used,
to generate a lightweight image.
The extension builds and copies the Go binary file to the rock.
By default, the base ``bare`` is used, to generate a lightweight image.


.. note::
Expand All @@ -27,7 +26,7 @@ in the root directory of the project.

If the main package is in the base directory and the rockcraft name
attribute is equal to the go module name, the name of the binary will
be selected correctly, otherwise you can adjust it.
be selected correctly, otherwise you will need to adjust it.

You can use this field to specify a different binary to be used as the
main application, without having to override the service command. For example,
Expand All @@ -48,8 +47,9 @@ next snippet:
=========================================================


Some files, if they exist, are included by default. These include:
``migrate``, ``migrate.sh``, ``templates/`` and ``static/``.
Some files, if they exist, are included by default in the rock in the
``/app`` directory. These include: ``migrate``, ``migrate.sh``,
``templates/`` and ``static/``.

You can customise the files to include by overriding the ``stage`` property
of the ``go-framework/assets`` part:
Expand Down
7 changes: 4 additions & 3 deletions docs/tutorial/go.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ Build the Go application so it can be run:
:end-before: [docs:go-build-end]
:dedent: 2

A new binary named ``go-hello-world`` should be in the current directory.
Run the Go application using ``./go-hello-world`` to verify that
it works.
A new binary named ``go-hello-world`` should be in the current
directory. This binary is only needed for local testing, as
Rockcraft will compile the Go application. Run the Go application using
``./go-hello-world`` to verify that it works.

Test the Go application by using ``curl`` to send a request to the root
endpoint. We may need a new terminal for this, if we are using Multipass use
Expand Down

0 comments on commit b22fabf

Please sign in to comment.