mirror of
https://github.com/pgsty/minio.git
synced 2026-09-05 18:16:16 +03:00
chore: drop the wait_pipe lint exclusion and use gomodguard_v2
Assigning the two pipe halves before returning them removes the gofumpt and gofmt disagreement that needed a permanent formatter exclusion. gomodguard is deprecated in golangci-lint v2.12; the v2 linter takes the same configuration. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PvgysXDmhPBBimCReYtA8q Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
+1
-4
@@ -5,7 +5,7 @@ linters:
|
|||||||
- durationcheck
|
- durationcheck
|
||||||
- forcetypeassert
|
- forcetypeassert
|
||||||
- gocritic
|
- gocritic
|
||||||
- gomodguard
|
- gomodguard_v2
|
||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- misspell
|
- misspell
|
||||||
@@ -59,9 +59,6 @@ formatters:
|
|||||||
exclusions:
|
exclusions:
|
||||||
generated: lax
|
generated: lax
|
||||||
paths:
|
paths:
|
||||||
# gofumpt v0.11.0 and Go 1.27's gofmt disagree on the indentation of
|
|
||||||
# multiple composite literals returned from a single statement.
|
|
||||||
- internal/ioutil/wait_pipe\.go$
|
|
||||||
- third_party$
|
- third_party$
|
||||||
- builtin$
|
- builtin$
|
||||||
- examples$
|
- examples$
|
||||||
|
|||||||
@@ -57,11 +57,7 @@ func WaitPipe() (*PipeReader, *PipeWriter) {
|
|||||||
r, w := io.Pipe()
|
r, w := io.Pipe()
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
return &PipeReader{
|
pr := &PipeReader{PipeReader: r, wait: wg.Wait}
|
||||||
PipeReader: r,
|
pw := &PipeWriter{PipeWriter: w, done: wg.Done}
|
||||||
wait: wg.Wait,
|
return pr, pw
|
||||||
}, &PipeWriter{
|
|
||||||
PipeWriter: w,
|
|
||||||
done: wg.Done,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user