Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Using Go 1.17.7 Toolset
Installing and using Go 1.17.7 Toolset
Abstract
Making open source more inclusive Link kopierenLink in die Zwischenablage kopiert!
Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.
Chapter 1. Go Toolset Link kopierenLink in die Zwischenablage kopiert!
Go Toolset is a Red Hat offering for developers on Red Hat Enterprise Linux (RHEL). It provides the Go programming language tools and libraries. Note that Go is alternatively known as golang.
Go Toolset is distributed as a part of Red Hat Developer Tools for Red Hat Enterprise Linux 7. Go Toolset is available as a module for Red Hat Enterprise Linux 8. Go Toolset is available as packages for Red Hat Enterprise Linux 9.
1.1. Go Toolset components Link kopierenLink in die Zwischenablage kopiert!
The following components are available as a part of Go Toolset:
Name | Version | Description |
---|---|---|
golang | RHEL 7 — 1.17.7, RHEL 8 — 1.17.7, RHEL 9 — 1.17.7 | A Go compiler. |
delve | RHEL 7 — 1.7.0, RHEL 8 — 1.7.0, RHEL 9 — 1.7.0 | A Go debugger. |
1.2. Go Toolset compatibility Link kopierenLink in die Zwischenablage kopiert!
Go Toolset is available for Red Hat Enterprise Linux 7 and Red Hat Enterprise Linux 8 and Red Hat Enterprise Linux 9 on the following architectures:
- AMD and Intel 64-bit
- 64-bit ARM (RHEL 8 and RHEL 9)
- IBM Power Systems, Little Endian
- 64-bit IBM Z
1.3. Getting access to Go Toolset on Red Hat Enterprise Linux 7 Link kopierenLink in die Zwischenablage kopiert!
To be able to install Go Toolset on Red Hat Enterprise Linux 7, you must access and enable Red Hat Developer Tools and Red Hat Software Collections repositories.
If these repositories are already attached to your system, see Installing Go Toolset.
Procedure
Install
Wget
by running:yum install wget
# yum install wget
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Download the latest subscription data by running:
subscription-manager refresh
# subscription-manager refresh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Register your system by running:
subscription-manager register
# subscription-manager register
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To register your system using a graphical user interface (GUI), follow the Registering and Unregistering a System guide.
Display a list of all available subscriptions and identify the pool ID by running:
subscription-manager list --available
# subscription-manager list --available
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Find the pool ID on the line beginning with
Pool ID
. Attach the subscription that provides access to the
Red Hat Developer Tools
repository to your system by running:subscription-manager attach --pool=<pool ID from the subscription>
# subscription-manager attach --pool=<pool ID from the subscription>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<pool ID from the subscription>
with the pool ID you identified in the previous step.
-
Replace
Verify which subscriptions are attached to your system by running:
sudo subscription-manager list --consumed
# sudo subscription-manager list --consumed
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable the
rhel-7-variant-devtools-rpms
repository by running:subscription-manager repos --enable rhel-7-<variant>-devtools-rpms
# subscription-manager repos --enable rhel-7-<variant>-devtools-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
<variant>
with your Red Hat Enterprise Linux system variant:server
orworkstation
.Use
server
to access the widest range of development tools.
Enable the
rhel-variant-rhscl-7-rpms
repository by running:subscription-manager repos --enable rhel-<variant>-rhscl-7-rpms
# subscription-manager repos --enable rhel-<variant>-rhscl-7-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<variant>
with your Red Hat Enterprise Linux system variant:server
orworkstation
.
-
Replace
Add the Red Hat Developer Tools GPG key to your system by running:
cd /etc/pki/rpm-gpg wget -O RPM-GPG-KEY-redhat-devel https://www.redhat.com/security/data/a5787476.txt rpm --import RPM-GPG-KEY-redhat-devel
# cd /etc/pki/rpm-gpg # wget -O RPM-GPG-KEY-redhat-devel https://www.redhat.com/security/data/a5787476.txt # rpm --import RPM-GPG-KEY-redhat-devel
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
1.4. Installing Go Toolset Link kopierenLink in die Zwischenablage kopiert!
Complete the following steps to install Go Toolset, including all dependent packages.
Prerequisites
-
On Red Hat Enterprise Linux 7, a subscription providing access to the Red Hat Developer Tools content set is attached to your system.
To attach the subscription, see Getting access to Go Toolset on Red Hat Enterprise Linux 7. - All available Red Hat Enterprise Linux updates are installed.
Procedure
On Red Hat Enterprise Linux 7, install the go-toolset-1.17
collection by running:
yum install go-toolset-1.17
# yum install go-toolset-1.17
On Red Hat Enterprise Linux 8, install the go-toolset
module by running:
yum module install go-toolset
# yum module install go-toolset
On Red Hat Enterprise Linux 9, install the go-toolset
package by running:
dnf install go-toolset
# dnf install go-toolset
1.5. Installing Go documentation Link kopierenLink in die Zwischenablage kopiert!
You can install documentation for the Go programming language on your local system.
Prerequisites
-
Go Toolset is installed.
For more information, see Installing Go Toolset.
Procedure
To install the golang-docs
package, run the following command:
On Red Hat Enterprise Linux 7:
yum install go-toolset-1.17-golang-docs
# yum install go-toolset-1.17-golang-docs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can find the documentation under the following path:
/opt/rh/go-toolset-1.17/root/usr/lib/go-toolset-1.17-golang/doc/docs.html
.On Red Hat Enterprise Linux 8:
yum install golang-docs
# yum install golang-docs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can find the documentation under the following path:
/usr/lib/golang/doc/effective_go.html
.On Red Hat Enterprise Linux 9:
dnf install golang-docs
# dnf install golang-docs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can find the documentation under the following path:
/usr/lib/golang/doc/go_spec.html
.
Chapter 2. The Go compiler Link kopierenLink in die Zwischenablage kopiert!
The Go compiler is a build tool and dependency manager for the Go programming language. It offers error checking and optimization of your code.
2.1. Prerequisites Link kopierenLink in die Zwischenablage kopiert!
-
Go Toolset is installed.
For more information, see Installing Go Toolset.
2.2. Setting up a Go workspace Link kopierenLink in die Zwischenablage kopiert!
To compile a Go program, you need to set up a Go workspace.
Procedure
Create a workspace directory as a subdirectory of
$GOPATH/src
.A common choice is
$HOME/go
.- Place your source files into your workspace directory.
Set the location of your workspace directory as an environment variable to the
$HOME/.bashrc
file by running:echo 'export GOPATH=<workspace_dir>' >> $HOME/.bashrc source $HOME/.bashrc
$ echo 'export GOPATH=<workspace_dir>' >> $HOME/.bashrc $ source $HOME/.bashrc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace <workspace_dir> with the name of your workspace directory.
2.3. Compiling a Go program Link kopierenLink in die Zwischenablage kopiert!
You can compile your Go program using the Go compiler. The Go compiler creates an executable binary file as a result of compiling.
Prerequisites
-
A set up Go workspace.
For information on how to set up a workspace, see Setting up a Go workspace.
Procedure
In your project directory, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'go build <output_file>'
$ scl enable go-toolset-1.17 'go build <output_file>'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<output_file<
with the desired name of your output file and<go_main_package>
with the name of your main package.
-
Replace
On Red Hat Enterprise Linux 8:
go build <output_file>
$ go build <output_file>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<output_file>
with the desired name of your output file and<go_main_package>
with the name of your main package.
-
Replace
On Red Hat Enterprise Linux 9:
go build <output_file>
$ go build <output_file>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<output_file>
with the desired name of your output file and<go_main_package>
with the name of your main package.
-
Replace
2.4. Running a Go program Link kopierenLink in die Zwischenablage kopiert!
The Go compiler creates an executable binary file as a result of compiling. Complete the following steps to execute this file and run your program.
Prerequisites
-
Your program is compiled.
For more information on how to compile your program, see Compiling a Go program.
Procedure
To run your program, run in the directory containing the executable file:
./<file_name>
$ ./<file_name>
-
Replace
<file_name>
with the name of your executable file.
2.5. Installing compiled Go projects Link kopierenLink in die Zwischenablage kopiert!
You can install already compiled Go projects to use their executable files and libraries in further Go projects. After installation, the executable files and libraries of the project are copied to according directories in the Go workspace. Its dependencies are installed as well.
Prerequisites
-
A Go workspace.
For more information, see Setting up a Go workspace.
Procedure
To install a Go project, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'go install <go_project>'
$ scl enable go-toolset-1.17 'go install <go_project>'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<go_project>
with the name of the Go project you want to install.
-
Replace
On Red Hat Enterprise Linux 8:
go install <go_project>
$ go install <go_project>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<go_project>
with the name of the Go project you want to install.
-
Replace
On Red Hat Enterprise Linux 9:
go install <go_project>
$ go install <go_project>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<go_project>
with the name of the Go project you want to install.
-
Replace
2.6. Downloading and installing Go projects Link kopierenLink in die Zwischenablage kopiert!
You can download and install third-party Go projects from online resources to use their executable files and libraries in further Go projects. After installation, the executable files and libraries of the project are copied to according directories in the Go workspace. Its dependencies are installed as well.
Prerequisites
-
A Go workspace.
For more information, see Setting up a Go workspace.
Procedure
To download and install a Go project, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'go get <third_party_go_project>'
$ scl enable go-toolset-1.17 'go get <third_party_go_project>'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<third_party_go_project>
with the name of the project you want to download.
-
Replace
On Red Hat Enterprise Linux 8:
go get <third_party_go_project>
$ go get <third_party_go_project>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<third_party_go_project>
with the name of the project you want to download.
-
Replace
On Red Hat Enterprise Linux 9:
go get <third_party_go_project>
$ go get <third_party_go_project>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<third_party_go_project>
with the name of the project you want to download.
-
Replace
For information on possible values of third-party projects, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'go help importpath'
$ scl enable go-toolset-1.17 'go help importpath'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Red Hat Enterprise Linux 8:
go help importpath
$ go help importpath
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Red Hat Enterprise Linux 9:
go help importpath
$ go help importpath
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 3. The gofmt formatting tool Link kopierenLink in die Zwischenablage kopiert!
Instead of a style guide, the Go programming language uses the gofmt
code formatting tool. gofmt
automatically formats your code according to the Go layout rules.
3.1. Prerequisites Link kopierenLink in die Zwischenablage kopiert!
-
Go Toolset is installed.
For more information, see Installing Go Toolset.
3.2. Formatting code Link kopierenLink in die Zwischenablage kopiert!
You can use the gofmt
formatting tool to format code in a given path. When the path leads to a single file, the changes apply only to the file. When the path leads to a directory, all .go
files in the directory are processed.
Procedure
To format your code in a given path, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'gofmt -w <code_path>'
$ scl enable go-toolset-1.17 'gofmt -w <code_path>'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to format.
-
Replace
On Red Hat Enterprise Linux 8:
gofmt -w <code_path>
$ gofmt -w <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to format.
-
Replace
On Red Hat Enterprise Linux 9:
gofmt -w <code_path>
$ gofmt -w <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to format.
-
Replace
To print the formatted code to standard output instead of writing it to the original file, omit the -w
option.
3.3. Previewing changes to code Link kopierenLink in die Zwischenablage kopiert!
You can use the gofmt
formatting tool to preview changes done by formatting code in a given path. The output in unified diff format is printed to standard output.
Procedure
To show differences in your code in a given path, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'gofmt -d <code_path>'
$ scl enable go-toolset-1.17 'gofmt -d <code_path>'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to compare.
-
Replace
On Red Hat Enterprise Linux 8:
gofmt -d <code_path>
$ gofmt -d <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to compare.
-
Replace
On Red Hat Enterprise Linux 9:
gofmt -d <code_path>
$ gofmt -d <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to compare.
-
Replace
3.4. Simplifying code Link kopierenLink in die Zwischenablage kopiert!
You can use the gofmt
formatting tool to simplify your code.
Procedure
To simplify code in a given path, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'gofmt -s <code_path>'
$ scl enable go-toolset-1.17 'gofmt -s <code_path>'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to simplify.
-
Replace
On Red Hat Enterprise Linux 8:
gofmt -s <code_path>
$ gofmt -s <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to simplify.
-
Replace
On Red Hat Enterprise Linux 9:
gofmt -s <code_path>
$ gofmt -s <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to simplify.
-
Replace
To apply the changes, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'gofmt -w <code_path>'
$ scl enable go-toolset-1.17 'gofmt -w <code_path>'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to format.
-
Replace
On Red Hat Enterprise Linux 8:
gofmt -w <code_path>
$ gofmt -w <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to format.
-
Replace
On Red Hat Enterprise Linux 9:
gofmt -w <code_path>
$ gofmt -w <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to format.
-
Replace
3.5. Refactoring code Link kopierenLink in die Zwischenablage kopiert!
You can use the gofmt
formatting tool to refactor your code by applying arbitrary substitutions.
Procedure
To refactor your code in a given path, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'gofmt -r <rewrite_rule> <code_path>'
$ scl enable go-toolset-1.17 'gofmt -r <rewrite_rule> <code_path>'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to refactor and<rewrite_rule>
with the rule you want it to be rewritten by.
-
Replace
On Red Hat Enterprise Linux 8:
gofmt -r <rewrite_rule> <code_path>
$ gofmt -r <rewrite_rule> <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to refactor and<rewrite_rule>
with the rule you want it to be rewritten by.
-
Replace
On Red Hat Enterprise Linux 9:
gofmt -r <rewrite_rule> <code_path>
$ gofmt -r <rewrite_rule> <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to refactor and<rewrite_rule>
with the rule you want it to be rewritten by.
-
Replace
To apply the changes, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'gofmt -w <code_path>'
$ scl enable go-toolset-1.17 'gofmt -w <code_path>'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to format.
-
Replace
On Red Hat Enterprise Linux 8:
gofmt -w <code_path>
$ gofmt -w <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to format.
-
Replace
On Red Hat Enterprise Linux 9:
gofmt -w <code_path>
$ gofmt -w <code_path>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<code_path>
with the path to the code you want to format.
-
Replace
Chapter 4. The Go race detector Link kopierenLink in die Zwischenablage kopiert!
Go Toolset includes the Go race detector, which is a tool of the Go standard library for finding race conditions.
Note that the race detector has a significant runtime resource overhead.
4.1. Prerequisites Link kopierenLink in die Zwischenablage kopiert!
-
Go Toolset is installed.
For more information, see Installing Go Toolset.
4.2. Using the Go race detector Link kopierenLink in die Zwischenablage kopiert!
Use the Go race detector to check your code for race conditions.
Procedure
To use the race detector, run:
On Red Hat Enterprise Linux 7:
scl enable go-toolset-1.17 'go build -race -o <output_file> <go_main_package>'
$ scl enable go-toolset-1.17 'go build -race -o <output_file> <go_main_package>'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<output_file>
with the name of your executable file and<go_main_package>
with the name of the package you want to test.
-
Replace
On Red Hat Enterprise Linux 8:
go build -race -o <output_file> <go_main_package>
$ go build -race -o <output_file> <go_main_package>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<output_file>
with the name of your executable file and<go_main_package>
with the name of the package you want to test.
-
Replace
On Red Hat Enterprise Linux 9:
go build -race -o <output_file> <go_main_package>
$ go build -race -o <output_file> <go_main_package>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<output_file>
with the name of your executable file and<go_main_package>
with the name of the package you want to test.
-
Replace
Chapter 5. Container images with Go Toolset Link kopierenLink in die Zwischenablage kopiert!
You can build your own Go Toolset containers from either Red Hat Enterprise Linux container images or Red Hat Universal Base Images (UBI).
5.1. Red Hat Enterprise Linux Go Toolset container images contents Link kopierenLink in die Zwischenablage kopiert!
The Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8 and Red Hat Enterprise Linux 9 container images of Go Toolset contain the following packages:
Component | Version | Package |
---|---|---|
| 1.17 | RHEL 7 — go-toolset-1.17.7 RHEL 8 — go-toolset-1.17.7 RHEL 9 — go-toolset-1.17.7 |
5.2. Accessing Red Hat Enterprise Linux container images Link kopierenLink in die Zwischenablage kopiert!
Pull the container image from the Red Hat registry before running your container and performing actions.
Procedure
To pull the required image, run:
For an image based on Red Hat Enterprise Linux 7:
podman pull registry.redhat.io/devtools/go-toolset-rhel7
# podman pull registry.redhat.io/devtools/go-toolset-rhel7
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For an image based on Red Hat Enterprise Linux 8:
podman pull registry.redhat.io/rhel8/go-toolset
# podman pull registry.redhat.io/rhel8/go-toolset
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For an image based on Red Hat Enterprise Linux 9:
podman pull registry.redhat.io/rhel9/go-toolset
# podman pull registry.redhat.io/rhel9/go-toolset
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.3. Accessing the UBI Go Toolset container image on RHEL 8 Link kopierenLink in die Zwischenablage kopiert!
On RHEL 8, install the UBI Go Toolset container image to access Go Toolset.
Alternatively, you can install Go Toolset to the RHEL 8 base UBI container image. For further information, see Accessing Go Toolset from the base UBI container image on RHEL 8.
Procedure
To pull the UBI Go Toolset container image from the Red Hat registry, run:
podman pull registry.access.redhat.com/ubi8/go-toolset
# podman pull registry.access.redhat.com/ubi8/go-toolset
5.4. Accessing Go Toolset from the base UBI container image on RHEL 8 Link kopierenLink in die Zwischenablage kopiert!
On RHEL 8, Go Toolset packages are part of the Red Hat Universal Base Images (UBIs) repositories, which means you can install Go Toolset as an addition to the base UBI container image. To keep the container image size small, install only individual packages instead of the entire Go Toolset.
Alternatively, you can install the UBI Go Toolset container image to access Go Toolset. For further information, see Accessing the UBI Go Toolset container image on RHEL 8.
Prerequisites
-
An existing Containerfile.
For information on creating Containerfiles, see the Dockerfile reference page.
Procedure
- To create a container image containing Go Toolset, add the following lines to your Containerfile:
FROM registry.access.redhat.com/ubi8/ubi:latest RUN yum module install -y go-toolset
FROM registry.access.redhat.com/ubi8/ubi:latest
RUN yum module install -y go-toolset
To create a container image containing an individual package only, add the following lines to your Containerfile:
RUN yum install -y <package-name>
RUN yum install -y <package-name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<package-name>
with the name of the package you want to install.
-
Replace
5.5. Using container images as Source-to-Image builder images on Red Hat Enterprise Linux 7 Link kopierenLink in die Zwischenablage kopiert!
You can use the Go Toolset container image as a Source-to-Image (S2I) builder image on Red Hat Enterprise Linux 7.
Procedure
-
Set the
IMPORT_URL
variable to a URL specifying the location of your code. -
To build your S2I builder image, run the
s2i build
command.
If the main package location is not identical with the location specified by the IMPORT_URL
variable, set the INSTALL_URL
variable to a URL that specifies the package location providing the application’s main executable file when built.
Chapter 6. Changes in Go Toolset Link kopierenLink in die Zwischenablage kopiert!
Go Toolset has been updated from version 1.16 to 1.17.7 on RHEL 7 and on RHEL 8. RHEL 9 Beta is distributed with Go Toolset 1.17.7.
Notable changes include:
- Added an option to convert slices to array pointers.
-
Added support for
//go:build
lines. -
Improvements to function call performance on
amd64
. - Function arguments are formatted more clearly in stack traces.
- Functions containing closures can be inlined.
-
Reduced resource consumption in
x509
certificate parsing. - The Delve debugger has been rebased to 1.7.0 so that it supports Go Toolset 1.17.7 on RHEL 7 and RHEL 8, and Go Toolset 1.17.7 on RHEL 9.