From 1414237defbf8f59e388476e12eeabbb3a0a1fc3 Mon Sep 17 00:00:00 2001 From: HF Date: Tue, 21 May 2024 12:09:36 -0400 Subject: [PATCH] Upgrade Go version to 1.21 --- LICENSE | 2 +- go.mod | 2 +- request.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index f02bea1..e1a5a3e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Hydrogen Fluoride +Copyright (c) 2024 crazytaxii Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/go.mod b/go.mod index d40ec8b..7a327f5 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/crazytaxii/gomeng -go 1.16 +go 1.21 diff --git a/request.go b/request.go index 0678027..ca5baae 100644 --- a/request.go +++ b/request.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "strings" "time" @@ -43,7 +43,7 @@ func (c *Client) doPost(param map[string]interface{}, endpoint string) (*Respons } defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return nil, err }