Remove dependency of deprecated ioutil package

This commit is contained in:
Deluan
2021-07-20 20:00:58 -04:00
parent 774ad65155
commit 8afa2cd833
23 changed files with 77 additions and 86 deletions
+1 -2
View File
@@ -3,7 +3,6 @@ package subsonic
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"strconv"
"strings"
@@ -67,7 +66,7 @@ func (c *StreamController) Stream(w http.ResponseWriter, r *http.Request) (*resp
}
if r.Method == "HEAD" {
go func() { _, _ = io.Copy(ioutil.Discard, stream) }()
go func() { _, _ = io.Copy(io.Discard, stream) }()
} else {
if c, err := io.Copy(w, stream); err != nil {
log.Error(ctx, "Error sending transcoded file", "id", id, err)