Skip to content

Commit

Permalink
[Go] Bump to 1.21 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
liranbg authored Dec 10, 2023
1 parent 2daf8c1 commit a2d6db3
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 159 deletions.
10 changes: 10 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ linters:
- structcheck
- typecheck
- gocritic
- gci

run:

Expand All @@ -52,6 +53,15 @@ linters-settings:
gocritic:
disabled-checks:
- commentFormatting # we dont want to enforce space before the comment text
gci:
sections:
- standard
- prefix(github.com/v3io/app-resource-scaler)
- default
- blank
- dot

custom-order: true

issues:

Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ autoscaler:
.PHONY: fmt
fmt:
gofmt -s -w .
./hack/lint/install.sh
.bin/golangci-lint run --fix

.PHONY: lint
lint: modules
Expand Down
4 changes: 2 additions & 2 deletions cmd/autoscaler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
#

FROM gcr.io/iguazio/golang:1.19-alpine3.17 AS builder
FROM gcr.io/iguazio/golang:1.21-alpine3.18 AS builder

RUN apk --update --no-cache add \
git \
Expand All @@ -31,7 +31,7 @@ COPY . .
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build -a -installsuffix cgo -ldflags="-s -w" -o autoscaler cmd/autoscaler/main.go

FROM gcr.io/iguazio/alpine:3.17
FROM gcr.io/iguazio/alpine:3.18

# copy autoscaler binary from build stage
COPY --from=builder /autoscaler/autoscaler /usr/local/bin
Expand Down
4 changes: 2 additions & 2 deletions cmd/dlx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
#

FROM gcr.io/iguazio/golang:1.19-alpine3.17 AS builder
FROM gcr.io/iguazio/golang:1.21-alpine3.18 AS builder

RUN apk --update --no-cache add \
git \
Expand All @@ -31,7 +31,7 @@ COPY . .
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build -a -installsuffix cgo -ldflags="-s -w" -o dlx cmd/dlx/main.go

FROM gcr.io/iguazio/alpine:3.17
FROM gcr.io/iguazio/alpine:3.18

# copy dlx binary from build stage
COPY --from=builder /dlx/dlx /usr/local/bin
Expand Down
53 changes: 30 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,50 +1,57 @@
module github.com/v3io/app-resource-scaler

go 1.19
go 1.21

require (
github.com/nuclio/errors v0.0.4
github.com/nuclio/logger v0.0.1
github.com/nuclio/zap v0.1.2
github.com/v3io/scaler v0.5.4
k8s.io/apimachinery v0.23.16
k8s.io/client-go v0.23.16
k8s.io/metrics v0.23.16
github.com/nuclio/zap v0.2.0
github.com/v3io/scaler v0.6.0
k8s.io/apimachinery v0.26.10
k8s.io/client-go v0.26.10
k8s.io/metrics v0.26.10
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // 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.19.14 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/liranbg/uberzap v1.20.0-nuclio.1 // indirect
github.com/logrusorgru/aurora/v3 v3.0.0 // indirect
github.com/logrusorgru/aurora/v4 v4.0.0 // indirect
github.com/mailru/easyjson v0.7.6 // 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/rogpeppe/go-internal v1.11.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/term v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.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.1 // indirect
k8s.io/api v0.23.16 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
k8s.io/api v0.26.10 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit a2d6db3

Please sign in to comment.