Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Go to 1.20, golangci-lint to v1.51.0 #1368

Merged
merged 2 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: 1.19.5
go-version: 1.20.0

- name: Run static checks
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5
with:
version: v1.50.1
version: v1.51.0
args: --config=.golangci.yml --verbose
skip-cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: 1.19.5
go-version: 1.20.0

- name: Set up Go for root
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/multicluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: 1.19.5
go-version: 1.20.0

- name: Set up job variables
id: vars
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
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@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: 1.19.5
go-version: 1.20.0

- name: Generate the artifacts
run: make release
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ linters-settings:
goimports:
local-prefixes: github.com/cilium/cilium-cli
gosimple:
go: "1.19"
go: "1.20"
govet:
enable-all: true
disable:
- fieldalignment
- shadow
staticcheck:
go: "1.19"
go: "1.20"
unused:
go: "1.19"
go: "1.20"

issues:
# This also warns about credential name variables which are false positives.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ TEST_TIMEOUT ?= 5s
RELEASE_UID ?= $(shell id -u)
RELEASE_GID ?= $(shell id -g)

GOLANGCILINT_WANT_VERSION = 1.50.1
GOLANGCILINT_WANT_VERSION = 1.51.0
GOLANGCILINT_VERSION = $(shell golangci-lint version 2>/dev/null)

$(TARGET):
Expand All @@ -27,7 +27,7 @@ release:
docker run \
--rm \
--workdir /cilium \
--volume `pwd`:/cilium docker.io/library/golang:1.19.5-alpine3.17 \
--volume `pwd`:/cilium docker.io/library/golang:1.20.0-alpine3.17 \
sh -c "apk add --no-cache setpriv make git && \
/usr/bin/setpriv --reuid=$(RELEASE_UID) --regid=$(RELEASE_GID) --clear-groups make GOCACHE=/tmp/gocache local-release"

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/cilium/cilium-cli

go 1.19
go 1.20

// Replace directives from github.com/cilium/cilium. Keep in sync when updating Cilium!
replace (
Expand Down