Merge pull request #5405 from restic/dependabot/github_actions/golangci/golangci-lint-action-8

build(deps): bump golangci/golangci-lint-action from 6 to 8
This commit is contained in:
Michael Eischer
2025-09-21 22:37:26 +02:00
committed by GitHub
27 changed files with 111 additions and 107 deletions

View File

@@ -64,7 +64,7 @@ func TestBucketWidth(t *testing.T) {
b := e.buckets.Back().Value.(*rateBucket)
rtest.Assert(t, b.totalBytes == 2, "b.totalBytes is %d, want 2", b.totalBytes)
rtest.Assert(t, b.end == when.Add(bucketWidth), "b.end is %v, want %v", b.end, when.Add(bucketWidth))
rtest.Assert(t, b.end.Equal(when.Add(bucketWidth)), "b.end is %v, want %v", b.end, when.Add(bucketWidth))
// Recording a byte outside the bucket width causes another bucket.
e.recordBytes(when.Add(bucketWidth), 1)
@@ -72,7 +72,7 @@ func TestBucketWidth(t *testing.T) {
b = e.buckets.Back().Value.(*rateBucket)
rtest.Assert(t, b.totalBytes == 1, "b.totalBytes is %d, want 1", b.totalBytes)
rtest.Assert(t, b.end == when.Add(2*bucketWidth), "b.end is %v, want %v", b.end, when.Add(bucketWidth))
rtest.Assert(t, b.end.Equal(when.Add(2*bucketWidth)), "b.end is %v, want %v", b.end, when.Add(bucketWidth))
// Recording a byte after a longer delay creates a sparse bucket list.
e.recordBytes(when.Add(time.Hour+time.Millisecond), 7)

View File

@@ -8,7 +8,7 @@ import (
// GetProgressChannel returns a channel with which a single listener
// receives each incoming signal.
func GetProgressChannel() <-chan os.Signal {
signals.Once.Do(func() {
signals.once.Do(func() {
signals.ch = make(chan os.Signal, 1)
setupSignals()
})
@@ -19,6 +19,6 @@ func GetProgressChannel() <-chan os.Signal {
// XXX The fact that signals is a single global variable means that only one
// listener receives each incoming signal.
var signals struct {
ch chan os.Signal
sync.Once
ch chan os.Signal
once sync.Once
}