mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-05 13:10:07 +00:00
⬆️ upgrade dependencies
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -67,7 +66,7 @@ func (c *AgentConfig) Save() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return ioutil.WriteFile(c.v.ConfigFileUsed(), data, os.ModePerm)
|
||||
return os.WriteFile(c.v.ConfigFileUsed(), data, os.ModePerm)
|
||||
}
|
||||
|
||||
// Config 站点配置
|
||||
@@ -159,5 +158,5 @@ func (c *Config) Save() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return ioutil.WriteFile(c.v.ConfigFileUsed(), data, os.ModePerm)
|
||||
return os.WriteFile(c.v.ConfigFileUsed(), data, os.ModePerm)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
@@ -150,7 +150,7 @@ func (ns *NotificationServerBundle) Send(message string) error {
|
||||
|
||||
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
||||
defer resp.Body.Close()
|
||||
body, _ := ioutil.ReadAll(resp.Body)
|
||||
body, _ := io.ReadAll(resp.Body)
|
||||
return fmt.Errorf("%d@%s %s", resp.StatusCode, resp.Status, string(body))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user