Replace all interface{} to any

This commit is contained in:
Tnze
2023-04-05 19:35:20 +08:00
parent 195945e4ca
commit a42267ba31
21 changed files with 52 additions and 52 deletions

View File

@ -28,7 +28,7 @@ var AuthURL = "https://authserver.mojang.com"
var client = http.DefaultClient
func post(endpoint string, payload interface{}, resp interface{}) error {
func post(endpoint string, payload any, resp any) error {
rowResp, err := rawPost(endpoint, payload)
if err != nil {
return fmt.Errorf("request fail: %v", err)
@ -43,7 +43,7 @@ func post(endpoint string, payload interface{}, resp interface{}) error {
return nil
}
func rawPost(endpoint string, payload interface{}) (*http.Response, error) {
func rawPost(endpoint string, payload any) (*http.Response, error) {
data, err := json.Marshal(payload)
if err != nil {
return nil, fmt.Errorf("marshal payload fail: %v", err)