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

feat: bump go version to 1.22 #934

Merged
merged 1 commit into from
Mar 18, 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
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: install Go
uses: actions/setup-go@v2
with:
go-version: 1.19
go-version: 1.22
- name: Setup K3d
uses: nolar/setup-k3d-k3s@v1.0.8
- name: run e2e
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go 1.19
- name: Set up Go 1.22
uses: actions/setup-go@v2
with:
go-version: 1.19
go-version: 1.22
- name: Running go tests with coverage
env:
GO111MODULE: on
Expand All @@ -36,15 +36,15 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go 1.19
- name: Set up Go 1.22
uses: actions/setup-go@v2
with:
go-version: 1.19
go-version: 1.22
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.52.2
version: v1.56.2
Publish: # Pack and publish image to Docker Hub and GitHub Release
runs-on: ubuntu-latest
needs: [Test, Lint]
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
go-version: 1.22
# Get version information
- name: Get version
id: get_version
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go 1.19
- name: Set up Go 1.22
uses: actions/setup-go@v2
with:
go-version: 1.19
go-version: 1.22

- run: go build ./...
- run: go vet ./...
Expand All @@ -42,12 +42,12 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go 1.19
- name: Set up Go 1.22
uses: actions/setup-go@v2
with:
go-version: 1.19
go-version: 1.22
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.52.2
version: v1.56.2
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ linters:
- govet
- gofumpt
- bodyclose
- depguard
# - depguard
- dogsled
- dupl
- exportloopref
Expand All @@ -48,7 +48,7 @@ linters:
linters-settings:
gofumpt:
# Select the Go version to target. The default is `1.15`.
lang-version: "1.19"
lang-version: "1.22"
# Choose whether or not to use the extra rules that are disabled
# by default
extra-rules: false
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19 AS build
FROM golang:1.22 AS build
COPY / /src
WORKDIR /src
RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build make build-local-linux
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN_IN_DOCKER+=-w /root/kusion ${KCLVM_BUILDER}
GOFORMATER ?= gofumpt
GOFORMATER_VERSION ?= v0.2.0
GOLINTER ?= golangci-lint
GOLINTER_VERSION ?= v1.52.2
GOLINTER_VERSION ?= v1.56.2
COVER_FILE ?= coverage.out
SOURCE_PATHS ?= ./pkg/...

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 kusionstack.io/kusion

go 1.19
go 1.22

require (
github.com/AlecAivazis/survey/v2 v2.3.4
Expand Down
45 changes: 45 additions & 0 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion kusion.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func main() {
rand.Seed(time.Now().UnixNano())
rand.New(rand.NewSource(time.Now().UnixNano()))

command := cmd.NewDefaultKusionctlCommand()

Expand Down
1 change: 0 additions & 1 deletion pkg/scaffold/demo_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ func GenDemoProject(dir, name string) error {

return nil
})

if err != nil {
return err
}
Expand Down
Loading