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

@ -2,7 +2,7 @@ package yggdrasil
import (
"fmt"
"io/ioutil"
"io"
)
// Validate checks if an accessToken is usable for authentication with a Minecraft server.
@ -28,7 +28,7 @@ func (a *Access) Invalidate() error {
defer resp.Body.Close()
if resp.StatusCode != 204 {
content, _ := ioutil.ReadAll(resp.Body)
content, _ := io.ReadAll(resp.Body)
return fmt.Errorf("invalidate error: %v: %s", resp.Status, content)
}