UBI and the oldest support Fedora (37) now all have go 1.19, so we are cleared to switch. gofmt now reformats comments in certain cases, so that explains the formatting changes in this commit. See https://go.dev/doc/go1.19#go-doc Signed-off-by: Ondřej Budai <ondrej@budai.cz>
21 lines
501 B
Bash
Executable file
21 lines
501 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
GO_VERSION=1.19.11
|
|
GO_BINARY=$(go env GOPATH)/bin/go$GO_VERSION
|
|
|
|
# this is the official way to get a different version of golang
|
|
# see https://go.dev/doc/manage-install
|
|
go install golang.org/dl/go$GO_VERSION@latest
|
|
$GO_BINARY download
|
|
|
|
# ensure that go.mod and go.sum are up to date, ...
|
|
$GO_BINARY mod tidy
|
|
$GO_BINARY mod vendor
|
|
|
|
# ... the code is formatted correctly, ...
|
|
$GO_BINARY fmt ./...
|
|
|
|
# ... and all code has been regenerated from its sources.
|
|
$GO_BINARY generate ./...
|