Commit e2a4b391 authored by Kirill Smelkov's avatar Kirill Smelkov

golang: Rework [gowork] documentation a bit

Put emphasis on that gowork defines Go workspace and explain first
settings that are related to that definition. Only after that say how to
use gowork.install. The reason for this is that gowork.install will
become optional in the next patch.
parent 9ea7e5df
...@@ -80,18 +80,16 @@ environment-extra = ...@@ -80,18 +80,16 @@ environment-extra =
# ---- infrastructure to build Go workspaces / projects ---- # ---- infrastructure to build Go workspaces / projects ----
# gowork is a top-level section representing workspace # gowork is the top-level section that defines Go workspace.
# #
# users should add `install` field to [gowork] to describe packages they want to # It specifies global settings that are used to build Go programs:
# be installed (+ automatically their dependencies are installed too). e.g. #
# - Go toolchain to use, e.g.
# #
# [gowork] # [gowork]
# install = # golang = ${golang1.15:location}
# lab.nexedi.com/kirr/neo/go/...
# github.com/pkg/profile
# golang.org/x/perf/cmd/benchstat
# #
# For Cgo support pkg-config is made pre-available by gowork, and users # - For Cgo support pkg-config is made pre-available by gowork, and users
# should list paths where to search for pkg-config files, e.g. this way: # should list paths where to search for pkg-config files, e.g. this way:
# #
# [gowork] # [gowork]
...@@ -99,11 +97,22 @@ environment-extra = ...@@ -99,11 +97,22 @@ environment-extra =
# ${sqlite3:location}/lib/pkgconfig # ${sqlite3:location}/lib/pkgconfig
# ${zlib:location}/lib/pkgconfig # ${zlib:location}/lib/pkgconfig
# #
# It is also possible to specify Go build flags used for compilation e.g. this way: # - It is also possible to specify Go build flags used for compilation e.g. this way:
# #
# [gowork] # [gowork]
# buildflags = -race # buildflags = -race
# #
#
# Users should add `install` field to [gowork] to describe packages they want to
# be installed (+ automatically their dependencies are installed too). e.g.
#
# [gowork]
# install =
# lab.nexedi.com/kirr/neo/go/...
# github.com/pkg/profile
# golang.org/x/perf/cmd/benchstat
#
#
# ${go:exe} is standalone executable that runs go in activated gowork environment. # ${go:exe} is standalone executable that runs go in activated gowork environment.
[go] [go]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment