Replace ioutil.Discard with io.Discard (#20707)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c00609ab8e
Коммит
eba08cbb11
@@ -8,7 +8,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -65,7 +64,7 @@ func GetMailBox(email string) (results JSONMessageHeaderInbucket, err error) {
|
||||
}
|
||||
|
||||
defer func() {
|
||||
io.Copy(ioutil.Discard, resp.Body)
|
||||
io.Copy(io.Discard, resp.Body)
|
||||
resp.Body.Close()
|
||||
}()
|
||||
|
||||
@@ -99,7 +98,7 @@ func GetMessageFromMailbox(email, id string) (JSONMessageInbucket, error) {
|
||||
return record, err
|
||||
}
|
||||
defer func() {
|
||||
io.Copy(ioutil.Discard, emailResponse.Body)
|
||||
io.Copy(io.Discard, emailResponse.Body)
|
||||
emailResponse.Body.Close()
|
||||
}()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user