Skip to content

Commit 887cbe3

Browse files
committed
go 1.19 -> 1.22 now that Debian(Trixie) has moved out of the dark ages
1 parent f450d3e commit 887cbe3

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Typical questions `fad` is designed to answer are:
5454
[![codecov](https://codecov.io/gh/markdingo/fad/branch/main/graph/badge.svg)](https://codecov.io/gh/markdingo/fad)
5555
[![Go Report Card](https://goreportcard.com/badge/github.com/markdingo/fad)](https://goreportcard.com/report/github.com/markdingo/fad)
5656

57-
`fad` is known to run on FreeBSD, macOS, Linux and Windows and requires go 1.19 or later.
57+
`fad` is known to run on FreeBSD, macOS, Linux and Windows and requires go 1.22 or later.
5858

5959
## Installation
6060

concurrency.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func newConcurrencyController(limit int) *concurrencyController {
5656
cc := &concurrencyController{limit: limit, minimum: limit,
5757
tokens: make(chan concurrencyToken, limit)}
5858

59-
for ; limit > 0; limit-- { // With go 1.22, change to "for range limit"
59+
for range limit {
6060
cc.tokens <- concurrencyToken{}
6161
}
6262

concurrency_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestConcurrency(t *testing.T) {
3030
t.Error("New controller has wrong capacity of", cap(cc.tokens), "expected", limit)
3131
}
3232

33-
for ix := 0; ix < limit*multiplier; ix++ { // go 1.22 for ix := range limit*multiplier
33+
for ix := range limit * multiplier {
3434
wg.Add(1)
3535
go func(myx int) {
3636
cc.start()

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/markdingo/fad
22

3-
go 1.19
3+
go 1.22

version.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)