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
|
||||
- forcetypeassert
|
||||
- gocritic
|
||||
- gomodguard
|
||||
- gomodguard_v2
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
@@ -59,9 +59,6 @@ formatters:
|
||||
exclusions:
|
||||
generated: lax
|
||||
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$
|
||||
- builtin$
|
||||
- examples$
|
||||
|
||||
@@ -57,11 +57,7 @@ func WaitPipe() (*PipeReader, *PipeWriter) {
|
||||
r, w := io.Pipe()
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
return &PipeReader{
|
||||
PipeReader: r,
|
||||
wait: wg.Wait,
|
||||
}, &PipeWriter{
|
||||
PipeWriter: w,
|
||||
done: wg.Done,
|
||||
}
|
||||
pr := &PipeReader{PipeReader: r, wait: wg.Wait}
|
||||
pw := &PipeWriter{PipeWriter: w, done: wg.Done}
|
||||
return pr, pw
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user