Skip to content

Commit

Permalink
Remove support for golang 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
ktong committed Nov 21, 2024
1 parent ecfc7c8 commit 0dca7fd
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
8 changes: 5 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ linters:
- canonicalheader
- containedctx
- contextcheck
# copyloopvar // go 1.22
- copyloopvar
- cyclop
- decorder
# depguard
Expand All @@ -51,7 +51,6 @@ linters:
- errchkjson
- errname
- errorlint
- exportloopref
- exhaustive
# exhaustruct
- fatcontext
Expand Down Expand Up @@ -82,11 +81,12 @@ linters:
- gosmopolitan
- govet
- grouper
- iface
- importas
- inamedparam
- ineffassign
- interfacebloat
# intrange // go 1.22
- intrange
- ireturn
- lll
# loggercheck
Expand All @@ -112,6 +112,7 @@ linters:
- promlinter
- protogetter
- reassign
- recvcheck
- revive
- rowserrcheck
- sloglint
Expand Down Expand Up @@ -144,6 +145,7 @@ issues:
linters:
- cyclop
- err113
- errcheck
- forcetypeassert
- funlen
- gochecknoglobals
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Removed

- Remove support for golang 1.21 (#52).

## [0.3.0] - 2024-03-11

### Changed
Expand Down
2 changes: 0 additions & 2 deletions gcp/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ func TestHandler(t *testing.T) {
t.Parallel()

for _, testcase := range testcases() {
testcase := testcase

t.Run(testcase.description, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/nil-go/sloth

go 1.21
go 1.22

retract [v0.1.0, v0.2.0] // wrong trace context key
2 changes: 1 addition & 1 deletion rate/counter.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func fnv32a(str string) uint32 {
prime32 = 16777619
)
hash := uint32(offset32)
for i := 0; i < len(str); i++ {
for i := range len(str) {
hash ^= uint32(str[i])
hash *= prime32
}
Expand Down
4 changes: 1 addition & 3 deletions rate/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ level=DEBUG msg=msg g.pos=after
}

for _, testcase := range testcases {
testcase := testcase

t.Run(testcase.description, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -127,7 +125,7 @@ func TestHandler_race(t *testing.T) {
start := make(chan struct{})
var waitGroup sync.WaitGroup
waitGroup.Add(procs)
for i := 0; i < procs; i++ {
for range procs {
go func() {
defer waitGroup.Done()

Expand Down
4 changes: 0 additions & 4 deletions sampling/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ func TestNew_panic(t *testing.T) {
}

for _, testcase := range testcases {
testcase := testcase

t.Run(testcase.description, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -95,8 +93,6 @@ level=INFO msg=info3
}

for _, testcase := range testcases {
testcase := testcase

t.Run(testcase.description, func(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit 0dca7fd

Please sign in to comment.