build: upgrade to go1.17 (#251)

This commit is contained in:
Daniel Moran
2021-09-01 14:11:15 -04:00
committed by GitHub
parent fa12328714
commit 7de3681224
5 changed files with 48 additions and 5 deletions

View File

@ -1,5 +1,9 @@
## v2.2.0 [unreleased] ## v2.2.0 [unreleased]
### Go Version
This release upgrades the project to `go` version 1.17.
### Bug Fixes ### Bug Fixes
1. [221](https://github.com/influxdata/influx-cli/pull/221): Fix shell completion for top-level `influx` commands. 1. [221](https://github.com/influxdata/influx-cli/pull/221): Fix shell completion for top-level `influx` commands.

17
go.mod
View File

@ -1,25 +1,40 @@
module github.com/influxdata/influx-cli/v2 module github.com/influxdata/influx-cli/v2
go 1.16 go 1.17
require ( require (
github.com/AlecAivazis/survey/v2 v2.2.9 github.com/AlecAivazis/survey/v2 v2.2.9
github.com/BurntSushi/toml v0.3.1 github.com/BurntSushi/toml v0.3.1
github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/MakeNowJust/heredoc/v2 v2.0.1
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
github.com/daixiang0/gci v0.2.8 github.com/daixiang0/gci v0.2.8
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.9.0 github.com/fatih/color v1.9.0
github.com/fujiwara/shapeio v1.0.0 github.com/fujiwara/shapeio v1.0.0
github.com/gocarina/gocsv v0.0.0-20210408192840-02d7211d929d github.com/gocarina/gocsv v0.0.0-20210408192840-02d7211d929d
github.com/gogo/protobuf v1.3.2 github.com/gogo/protobuf v1.3.2
github.com/golang/mock v1.5.0 github.com/golang/mock v1.5.0
github.com/google/go-jsonnet v0.17.0 github.com/google/go-jsonnet v0.17.0
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.13 github.com/mattn/go-isatty v0.0.13
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/olekukonko/tablewriter v0.0.5 github.com/olekukonko/tablewriter v0.0.5
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/stretchr/objx v0.1.0 // indirect
github.com/stretchr/testify v1.7.0 github.com/stretchr/testify v1.7.0
github.com/urfave/cli v1.22.5 github.com/urfave/cli v1.22.5
go.etcd.io/bbolt v1.3.6 go.etcd.io/bbolt v1.3.6
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
golang.org/x/mod v0.3.0 // indirect
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 // indirect
golang.org/x/text v0.3.3 golang.org/x/text v0.3.3
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
golang.org/x/tools v0.1.0 golang.org/x/tools v0.1.0
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
honnef.co/go/tools v0.2.0 honnef.co/go/tools v0.2.0
) )

View File

@ -1,3 +1,4 @@
//go:build !windows
// +build !windows // +build !windows
package signals package signals

View File

@ -1,11 +1,31 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail
declare -r GO_VERSION=1.16.5 declare -r GO_VERSION=1.17
# Hashes are from the table at https://golang.org/dl/
function go_hash () {
case $1 in
linux_amd64)
echo 6bf89fc4f5ad763871cf7eac80a2d594492de7a818303283f1366a7f6a30372d
;;
linux_arm64)
echo 01a9af009ada22122d3fcb9816049c1d21842524b38ef5d5a0e2ee4b26d7c3e7
;;
mac)
echo 355bd544ce08d7d484d9d7de05a71b5c6f5bc10aa4b316688c2192aeb3dacfd1
;;
windows)
echo 2a18bd65583e221be8b9b7c2fbe3696c40f6e27c2df689bbdcc939d49651d151
;;
esac
}
function install_go_linux () { function install_go_linux () {
ARCHIVE=go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz local -r arch=$(dpkg --print-architecture)
ARCHIVE=go${GO_VERSION}.linux-${arch}.tar.gz
wget https://golang.org/dl/${ARCHIVE} wget https://golang.org/dl/${ARCHIVE}
echo "$(go_hash linux_${arch}) ${ARCHIVE}" | sha256sum --check --
tar -C $1 -xzf ${ARCHIVE} tar -C $1 -xzf ${ARCHIVE}
rm ${ARCHIVE} rm ${ARCHIVE}
} }
@ -13,6 +33,7 @@ function install_go_linux () {
function install_go_mac () { function install_go_mac () {
ARCHIVE=go${GO_VERSION}.darwin-amd64.tar.gz ARCHIVE=go${GO_VERSION}.darwin-amd64.tar.gz
wget https://golang.org/dl/${ARCHIVE} wget https://golang.org/dl/${ARCHIVE}
echo "$(go_hash mac) ${ARCHIVE}" | shasum -a 256 --check -
tar -C $1 -xzf ${ARCHIVE} tar -C $1 -xzf ${ARCHIVE}
rm ${ARCHIVE} rm ${ARCHIVE}
} }
@ -20,6 +41,7 @@ function install_go_mac () {
function install_go_windows () { function install_go_windows () {
ARCHIVE=go${GO_VERSION}.windows-amd64.zip ARCHIVE=go${GO_VERSION}.windows-amd64.zip
wget https://golang.org/dl/${ARCHIVE} wget https://golang.org/dl/${ARCHIVE}
echo "$(go_hash windows) ${ARCHIVE}" | sha256sum --check --
unzip -qq -d $1 ${ARCHIVE} unzip -qq -d $1 ${ARCHIVE}
rm ${ARCHIVE} rm ${ARCHIVE}
} }

View File

@ -1,3 +1,4 @@
//go:build tools
// +build tools // +build tools
package influxcli package influxcli