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 to Go 1.22 #33

Merged
merged 3 commits into from
Feb 19, 2024
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
6 changes: 1 addition & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ permissions:
contents: read

env:
GO_VERSION: "1.21"
GOLANGCI_LINT_VERSION: "v1.55.2"
GO_VERSION: "1.22"

jobs:
lint:
Expand All @@ -23,6 +22,3 @@ jobs:
run: go mod download
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=10m
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
IMAGE: "nccloud/mayfly"
REGISTRY: "ghcr.io"
GO_VERSION: "1.21"
GO_VERSION: "1.22"
TAG: ${{ github.event.release.tag_name }}

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
contents: write

env:
GO_VERSION: "1.21"
GO_VERSION: "1.22"
GOPRIVATE: "github:com/NCCloud/*"

jobs:
Expand Down
4 changes: 3 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ linters:
- tagalign # Buggy
- lll
- funlen
- perfsprint
linters-settings:
cyclop:
max-complexity: 12
run:
go: '1.21'
go: '1.22'
timeout: 10m
tests: false
skip-dirs:
- cmd/benchmark
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21 as builder
FROM golang:1.22 as builder

WORKDIR /workspace
COPY go.mod go.mod
Expand Down
6 changes: 3 additions & 3 deletions devops.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

export CONTROLLER_GEN_VERSION="v0.14.0"
export GOLANGCI_LINT_VERSION="v1.55.2"
export MOCKERY_GEN_VERSION="v2.36.0"
export GOFUMPT_VERSION="v0.5.0"
export GOLANGCI_LINT_VERSION="v1.56.2"
export MOCKERY_GEN_VERSION="v2.42.0"
export GOFUMPT_VERSION="v0.6.0"
export TESTENV_VERSION="1.25.x!"

prerequisites() {
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/NCCloud/mayfly

go 1.21
go 1.22

require (
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 33 additions & 1 deletion mocks/sigs.k8s.io/controller-runtime/pkg/cache/mock_Cache.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 53 additions & 1 deletion mocks/sigs.k8s.io/controller-runtime/pkg/client/mock_Client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading