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 v1.20 #444

Merged
merged 4 commits into from
Jun 29, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- uses: actions/setup-go@v1
with:
go-version: 1.18.1
go-version: 1.20
- name: Generate files
run: |
go generate ./pkg/tools/k8s/gen.go
Expand Down
28 changes: 11 additions & 17 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
---
run:
# concurrency: 6
go: "1.17"
go: '1.20'
timeout: 2m
issues-exit-code: 1
tests: true
linters-settings:
goheader:
template-path: ".license/template.txt"
template-path: .license/template.txt
values:
regexp:
company: .*
copyright-holder: Copyright \(c\) ({{year-range}}) {{company}}\n\n
copyright-holders: ({{copyright-holder}})+
copyright-holder: 'Copyright \(c\) ({{year-range}}) {{company}}\n\n'
copyright-holders: '({{copyright-holder}})+'
errcheck:
check-type-assertions: false
check-blank: false
Expand All @@ -38,17 +37,15 @@ linters-settings:
funlen:
Lines: 100
Statements: 50
depguard:
rules:
main:
deny:
- pkg: errors
desc: Please use github.com/pkg/errors instead of errors in go imports
goconst:
min-len: 2
min-occurrences: 2
depguard:
list-type: blacklist
include-go-root: false
packages:
- errors
packages-with-error-message:
# specify an error message to output when a blacklisted package is used
- errors: "Please use \"github.com/pkg/errors\" instead of \"errors\" in go imports"
misspell:
locale: US
unparam:
Expand Down Expand Up @@ -128,13 +125,12 @@ linters-settings:
linters:
disable-all: true
enable:
# - rowserrcheck
- goheader
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- depguard
- errcheck
- funlen
- gochecknoinits
Expand All @@ -149,7 +145,6 @@ linters:
- govet
- ineffassign
- interfacer
# - lll
- misspell
- nakedret
- scopelint
Expand All @@ -159,7 +154,6 @@ linters:
- typecheck
- unconvert
- unparam
# - unused
- varcheck
- whitespace
issues:
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/networkservicemesh/sdk-k8s

go 1.18
go 1.20

require (
github.com/fsnotify/fsnotify v1.5.4
Expand Down
2 changes: 1 addition & 1 deletion pkg/registry/etcd/nse_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ package etcd_test

import (
"context"
"errors"
"io"
"testing"
"time"

"github.com/networkservicemesh/api/pkg/api/registry"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/types/known/timestamppb"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
16 changes: 8 additions & 8 deletions pkg/tools/k8s/client/clientset/versioned/fake/register.go

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

16 changes: 8 additions & 8 deletions pkg/tools/k8s/client/clientset/versioned/scheme/register.go

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