[go: nahoru, domu]

Skip to content

Commit

Permalink
bump Go to 1.18 (goharbor#926)
Browse files Browse the repository at this point in the history
* bump Go to 1.18

Signed-off-by: yxxhero <aiopsclub@163.com>
  • Loading branch information
yxxhero committed Jul 18, 2022
1 parent 704cd7a commit 8a09ac2
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 409 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- uses: actions/checkout@v2
- name: Build manager
run: |
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- uses: actions/checkout@v2
- name: Package charts
run: make helm-generate
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
run: git fetch --prune --unshallow
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- name: prepare changelog
run: |
tag=${{ github.ref }}
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- uses: actions/checkout@v2
- name: Build manager
run: |
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- uses: actions/checkout@v2
- run: make docker-build

Expand All @@ -37,7 +37,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- uses: actions/checkout@v2
- run: make go-lint

Expand All @@ -47,7 +47,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- uses: actions/checkout@v2
- run: make go-dependencies-test

Expand All @@ -57,7 +57,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- uses: actions/checkout@v2
- run: make generated-diff-test

Expand All @@ -73,7 +73,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- name: Cache go mod
uses: actions/cache@v2
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- uses: azure/setup-kubectl@v1
with:
Expand Down Expand Up @@ -363,7 +363,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- uses: azure/setup-kubectl@v1
with:
Expand Down Expand Up @@ -572,7 +572,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- uses: azure/setup-kubectl@v1
with:
Expand Down Expand Up @@ -736,7 +736,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- uses: actions/checkout@v2
- run: make manifests
- uses: azure/k8s-bake@v1
Expand All @@ -751,7 +751,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- uses: actions/checkout@v2
- run: make manifests
- uses: azure/k8s-bake@v1
Expand Down
8 changes: 4 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ linters:
- gofumpt
- goheader
- goimports
- golint
- revive
- gomnd
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- interfacer
- maligned
# - interfacer
# - maligned
- misspell
- nakedret
- nestif
Expand All @@ -51,7 +51,7 @@ linters:
- nolintlint
- prealloc
- rowserrcheck
- scopelint
- exportloopref
- sqlclosecheck
- staticcheck
- structcheck
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ $(MARKDOWNLINT):
# find or download golangci-lint
# download golangci-lint if necessary
GOLANGCI_LINT := $(BIN)/golangci-lint
GOLANGCI_LINT_VERSION := 1.45.2
GOLANGCI_LINT_VERSION := 1.46.2

.PHONY: golangci-lint
golangci-lint:
Expand Down Expand Up @@ -638,7 +638,7 @@ $(GORELEASER):

# find or download stringer
# download stringer if necessary
STRINGER_VERSION := v0.1.10
STRINGER_VERSION := v0.1.11
STRINGER := $(BIN)/stringer

.PHONY: stringer
Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Have a look in [CONTRIBUTING.md](https://github.com/goharbor/harbor-operator/blo

### Packages

- [Go 1.17+](https://golang.org/)
- [Go 1.18+](https://golang.org/)
- [Helm](https://helm.sh/)
- [Docker](https://docker.com) & [Docker Compose](https://docs.docker.com/compose/install/)
- [OpenSSL](https://www.openssl.org/)
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/goharbor/harbor-operator

go 1.17
go 1.18

require (
github.com/Masterminds/semver v1.5.0
Expand Down
385 changes: 0 additions & 385 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/controller/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func needsNodePort(svc *corev1.Service) bool {
return false
}

func (c *Controller) AddUnsctructuredToManage(ctx context.Context, resource *unstructured.Unstructured, dependencies ...graph.Resource) (graph.Resource, error) { // nolint:interfacer
func (c *Controller) AddUnsctructuredToManage(ctx context.Context, resource *unstructured.Unstructured, dependencies ...graph.Resource) (graph.Resource, error) {
if resource == nil {
return nil, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/strings/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
baseBitSize = 64
)

var seededRand *rand.Rand = rand.New(rand.NewSource(time.Now().UnixNano())) // nolint:gosec
var seededRand = rand.New(rand.NewSource(time.Now().UnixNano())) // nolint:gosec

func NormalizeName(name string, suffixes ...string) string {
if len(suffixes) > 0 {
Expand Down

0 comments on commit 8a09ac2

Please sign in to comment.