update to 1.16 and removes usage of "io/ioutil"

This commit is contained in:
Tnze
2021-02-25 12:43:39 +08:00
parent 178c34eacb
commit 9b6f640843
10 changed files with 34 additions and 21 deletions

View File

@ -10,7 +10,7 @@ import (
"crypto/x509"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"strings"
@ -176,7 +176,7 @@ func loginAuth(AsTk, name, UUID string, shareSecret []byte, er encryptionRequest
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
body, _ := io.ReadAll(resp.Body)
if resp.Status != "204 No Content" {
return fmt.Errorf("auth fail: %s", string(body))
}