Skip to content

Commit

Permalink
Bump to Go 1.17
Browse files Browse the repository at this point in the history
Bump to Go `1.17`.

Update modules with newer versions.

Simplify GitHub Action for build and test.

Fix `go vet` finding.

Add headlines to clear Markdown findings.
  • Loading branch information
HeavyWombat committed Nov 9, 2021
1 parent 76d279b commit b634f27
Show file tree
Hide file tree
Showing 9 changed files with 237 additions and 240 deletions.
49 changes: 13 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,45 +23,22 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
go-version: 1.17.x

- name: Install Tools
run: |
pushd "$(mktemp -d)"
go get github.com/gordonklaus/ineffassign
go get golang.org/x/lint/golint
go get github.com/client9/misspell/cmd/misspell
go get honnef.co/go/tools/cmd/staticcheck
go get github.com/onsi/ginkgo/ginkgo github.com/onsi/gomega/...
popd
- name: Verify Go Modules Setup
run: |
go mod verify
- name: Build Go Code
run: |
go build ./...
- name: Sanity Check (go vet)
run: |
go vet ./...
- name: Sanity Check (ineffassign)
run: |
ineffassign ./...
- name: Sanity Check (golint)
run: |
golint ./...
- name: Sanity Check (misspell)
run: |
find . -type f | xargs misspell -source=text -error
- name: Sanity Check (staticcheck)
run: |
staticcheck ./...
go install github.com/gordonklaus/ineffassign@latest
go install golang.org/x/lint/golint@latest
go install github.com/client9/misspell/cmd/misspell@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/onsi/ginkgo/ginkgo@latest
- run: go build ./...
- run: go vet ./...
- run: ineffassign ./...
- run: golint ./...
- run: find . -type f | xargs misspell -source=text -error
- run: staticcheck ./...

- name: Run Go Unit Tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
go-version: 1.17.x

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down
2 changes: 1 addition & 1 deletion Build-System.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RUN apt-get update >/dev/null && \
rm -rf /var/lib/apt/lists/*

# Install Golang
RUN curl --progress-bar --location https://storage.googleapis.com/golang/go1.16.linux-amd64.tar.gz | tar -xzf - -C /usr/local
RUN curl --progress-bar --location https://storage.googleapis.com/golang/go1.17.linux-amd64.tar.gz | tar -xzf - -C /usr/local
ENV GOPATH=/go
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

Expand Down
2 changes: 1 addition & 1 deletion Havener-Alpine.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

FROM golang:1.16-alpine AS build
FROM golang:1.17-alpine AS build
COPY . /go/src/github.com/homeport/havener
RUN apk add --update git curl && \
curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh && \
Expand Down
2 changes: 1 addition & 1 deletion Havener-Ubuntu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

FROM golang:1.16 AS build
FROM golang:1.17 AS build
COPY . /go/src/github.com/homeport/havener
RUN curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh && \
cd /go/src/github.com/homeport/havener && \
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ Like `kubectl`, `havener` relies on the Kubernetes configuration that can be set

### Notable Use Cases

#### Usage overview

> ![havener](.docs/images/havener-top.png?raw=true "Havener terminal screenshot of top command")
> Quickly get a live overview of the current cluster usage details, for example Load, CPU, and Memory of the cluster nodes.
#### Pods in namespace overview

> ![havener](.docs/images/havener-watch.png?raw=true "Havener terminal screenshot of watch command")
> Watch pods in multiple namespaces with added colors to help identify the respective state.
Expand Down Expand Up @@ -67,7 +71,7 @@ There are different ways to get `havener`. You are free to pick the one that mak

We are happy to have other people contributing to the project. If you decide to do that, here's how to:
- get Go (`havener` requires Go version 1.16 or greater)
- get Go (`havener` requires Go version 1.17 or greater)
- fork the project
- create a new branch
- make your changes
Expand Down Expand Up @@ -103,7 +107,7 @@ docker run \
--rm \
--volume $GOPATH/src/github.com/homeport/havener:/go/src/github.com/homeport/havener \
--workdir /go/src/github.com/homeport/havener \
golang:1.16 /bin/bash
golang:1.17 /bin/bash
```
### Package dependencies (Go modules)
Expand Down
2 changes: 1 addition & 1 deletion cmd/havener/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

func main() {
// Register on operating system signals for an external unexpected exit
signals := make(chan os.Signal)
signals := make(chan os.Signal, 1)
signal.Notify(signals, os.Interrupt, syscall.SIGTERM)
go func() {
<-signals
Expand Down
98 changes: 85 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,99 @@
module github.com/homeport/havener

go 1.16
go 1.17

require (
github.com/gonvenience/bunt v1.3.2
github.com/gonvenience/neat v1.3.6
github.com/gonvenience/neat v1.3.7
github.com/gonvenience/term v1.0.1
github.com/gonvenience/text v1.0.6
github.com/gonvenience/wait v1.0.2
github.com/gonvenience/wrap v1.1.0
github.com/lucasb-eyer/go-colorful v1.2.0
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.16.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
github.com/spf13/cobra v1.2.1
github.com/spf13/viper v1.8.1
github.com/spf13/viper v1.9.0
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678
golang.org/x/term v0.0.0-20210916214954-140adaaadfaf
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
k8s.io/api v0.22.1
k8s.io/apimachinery v0.22.1
k8s.io/cli-runtime v0.22.1
k8s.io/client-go v0.22.1
k8s.io/kubectl v0.22.1
k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9
k8s.io/api v0.22.3
k8s.io/apimachinery v0.22.3
k8s.io/cli-runtime v0.22.3
k8s.io/client-go v0.22.3
k8s.io/kubectl v0.22.3
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a
)

require (
cloud.google.com/go v0.93.3 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/go-logr/logr v0.4.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.5 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-ciede2000 v0.0.0-20170301095244-782e8c62fec3 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
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/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
golang.org/x/net v0.0.0-20210917163549-3c21e5b27794 // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.9.0 // indirect
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect
sigs.k8s.io/kustomize/api v0.8.11 // indirect
sigs.k8s.io/kustomize/kyaml v0.11.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)
Loading

0 comments on commit b634f27

Please sign in to comment.