Explicitly ignore io.Copy's return values (#352)
We're probably ignoring any errors here, since we're writing to a memory buffer here. Let's make it clear we didn't just forget to check, but really want to ignore these values.
This commit is contained in:
parent
2c504eb8be
commit
3f9dd2870f
@ -55,8 +55,9 @@ func (s *FileWriterReceiverService) uploadHandler(w http.ResponseWriter, r *http
|
||||
writePath := filepath.Join(config.PrivateHLSStoragePath, path)
|
||||
|
||||
var buf bytes.Buffer
|
||||
io.Copy(&buf, r.Body)
|
||||
_, _ = io.Copy(&buf, r.Body)
|
||||
data := buf.Bytes()
|
||||
|
||||
f, err := os.Create(writePath)
|
||||
if err != nil {
|
||||
returnError(err, w, r)
|
||||
|
Loading…
x
Reference in New Issue
Block a user