-
Notifications
You must be signed in to change notification settings - Fork 170
Description
Describe the bug
https://github.com/charmbracelet/soft-serve/blob/main/pkg/web/git.go#L472
code in here should return a new err
nRead, err := r.Read(p)
if err == io.EOF {
break
}
nWrite, err := f.ResponseWriter.Write(p[:nRead])
if err != nil {
return n, err
}
if nRead != nWrite {
return n, err
}
the err
is nil , but here need return a new err
see golang io.Copy
implement here
https://github.com/golang/go/blob/master/src/io/io.go#L431-L445
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: [e.g. Linux]
- Terminal [e.g. kitty, iterm2, gnome-terminal]
- Version [e.g. v0.4.0]
Additional context
Add any other context about the problem here.
I create a linter to detect code that returns a non-relevant nilness error bug. I checked the top 1000 GitHub Go repositories and found this, all result listed in alingse/sundrylint#4