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.23 #177

Merged
merged 7 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v1
uses: actions/setup-go@v5
with:
go-version: 1.20.5
go-version: 1.23.2
- name: Build
run: go build -race ./...
- name: Test
Expand All @@ -46,13 +46,13 @@ jobs:
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v1
uses: actions/setup-go@v5
with:
go-version: 1.20.5
go-version: 1.23.2
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3
version: v1.60.3

excludeFmtErrorf:
name: exclude fmt.Errorf
Expand Down
44 changes: 9 additions & 35 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
run:
# concurrency: 6
go: "1.17"
go: "1.23"
timeout: 2m
issues-exit-code: 1
tests: true
Expand All @@ -11,41 +11,30 @@ linters-settings:
values:
regexp:
company: .*
copyright-holder: Copyright \(c\) ({{year-range}}) {{company}}\n\n
copyright-holder: Copyright \(c\) ({{mod-year-range}}) {{company}}\n\n
copyright-holders: ({{copyright-holder}})+
errcheck:
check-type-assertions: false
check-blank: false
govet:
check-shadowing: true
enable:
- shadow
settings:
printf:
funcs:
- (github.com/sirupsen/logrus.FieldLogger).Infof
- (github.com/sirupsen/logrus.FieldLogger).Warnf
- (github.com/sirupsen/logrus.FieldLogger).Errorf
- (github.com/sirupsen/logrus.FieldLogger).Fatalf
golint:
min-confidence: 0.8
goimports:
local-prefixes: github.com/networkservicemesh/api
gocyclo:
min-complexity: 15
maligned:
suggest-new: true
dupl:
threshold: 150
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 All @@ -56,6 +45,9 @@ linters-settings:
simple: true
range-loops: true
for-loops: false
gosec:
excludes:
- G115
gocritic:
enabled-checks:
- appendAssign
Expand Down Expand Up @@ -127,10 +119,9 @@ linters-settings:
linters:
disable-all: true
enable:
# - rowserrcheck
- rowserrcheck
- goheader
- bodyclose
- deadcode
- dogsled
- dupl
- errcheck
Expand All @@ -141,42 +132,25 @@ linters:
- gocyclo
- gofmt
- goimports
- golint
- gosec
- gosimple
- govet
- ineffassign
- interfacer
# - lll
- misspell
- nakedret
- scopelint
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
# - unused
- varcheck
- unused
- whitespace
issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- path: pkg/api/networkservice/mechanism_helpers.go
linters:
- interfacer
text: "can be `github.com/golang/protobuf/proto.Message"
- path: pkg/api/networkservice/connection_helpers.go
linters:
- interfacer
text: "can be `github.com/golang/protobuf/proto.Message"
- path: pkg/api/networkservice/path_segment_helpers.go
linters:
- interfacer
text: "can be `github.com/golang/protobuf/proto.Message"
- path: pkg/api/networkservice/connectioncontext_helpers_test.go
linters:
- funlen
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/api

go 1.20
go 1.23

require (
github.com/pkg/errors v0.9.1
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
Loading