Skip to content

Commit

Permalink
Update to Go v1.21 + dependencies (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
jthomperoo committed Aug 15, 2023
1 parent 79039e8 commit 4a109db
Show file tree
Hide file tree
Showing 26 changed files with 170 additions and 353 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.17
go-version: 1.21
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
Expand All @@ -21,7 +21,7 @@ jobs:
# Get staticcheck
export PATH=$PATH:$(go env GOPATH)/bin
go install honnef.co/go/tools/cmd/staticcheck@v0.3.0
go install honnef.co/go/tools/cmd/staticcheck@v0.4.3
# Lint and test
make lint
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Upgraded to Go `v1.21`.
- Upgraded package dependencies.

## [v2.7.0] - 2022-05-14
### Changed
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ the other projects that solved it better and which could serve as inspiration.

Developing this project requires these dependencies:

* [Go](https://golang.org/doc/install) >= `1.17`
* [staticcheck](https://staticcheck.io/docs/getting-started/) == `v0.3.0 (2022.1)`
* [Go](https://golang.org/doc/install) >= `1.21`
* [staticcheck](https://staticcheck.io/docs/getting-started/) == `v0.4.3 (2023.1.3)`
* [Docker](https://docs.docker.com/install/)

To view the docs, you need Python 3 installed:
Expand Down
2 changes: 1 addition & 1 deletion config/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package config

import (
autoscaling "k8s.io/api/autoscaling/v2beta2"
autoscaling "k8s.io/api/autoscaling/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion config/k8smetric.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package config

import (
autoscalingv2 "k8s.io/api/autoscaling/v2beta2"
autoscalingv2 "k8s.io/api/autoscaling/v2"
)

// K8sMetricSpec defines which metrics to query from the metrics server
Expand Down
58 changes: 31 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,54 +1,58 @@
module github.com/jthomperoo/custom-pod-autoscaler/v2

go 1.17
go 1.21

require (
github.com/go-chi/chi v4.0.2+incompatible
github.com/golang/glog v1.0.0
github.com/google/go-cmp v0.5.8
github.com/jthomperoo/k8shorizmetrics v1.0.0
k8s.io/api v0.24.0
k8s.io/apimachinery v0.24.0
k8s.io/client-go v0.24.0
github.com/go-chi/chi v4.1.2+incompatible
github.com/golang/glog v1.1.2
github.com/google/go-cmp v0.5.9
github.com/jthomperoo/k8shorizmetrics/v2 v2.0.1
k8s.io/api v0.27.4
k8s.io/apimachinery v0.27.4
k8s.io/client-go v0.27.4
)

require (
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful v2.15.0+incompatible // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.21.1 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/onsi/ginkgo v1.14.1 // indirect
github.com/onsi/gomega v1.10.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/net v0.0.0-20220513224357-95641704303c // indirect
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a // indirect
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/kube-openapi v0.0.0-20220413171646-5e7f5fdc6da6 // indirect
k8s.io/metrics v0.24.0 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.4.2 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/metrics v0.26.2 // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

0 comments on commit 4a109db

Please sign in to comment.