Skip to content

Commit

Permalink
移除过时的包
Browse files Browse the repository at this point in the history
  • Loading branch information
b3nguang committed Jul 30, 2024
1 parent 3d71a27 commit ca1aad9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package config

import (
"fmt"
"io/ioutil"
"log"
"os"
"strconv"
Expand Down Expand Up @@ -90,7 +89,7 @@ func LoadConfig() *Configuration {
once.Do(func() {
// 从文件中读取
config = &Configuration{}
data, err := ioutil.ReadFile("config.yml")
data, err := os.ReadFile("config.yml")
if err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions config/prompt.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package config

import (
"io/ioutil"
"log"
"os"

"gopkg.in/yaml.v3"
)
Expand All @@ -17,7 +17,7 @@ var prompTmp *[]Prompt

// LoadPrompt 加载Prompt
func LoadPrompt() *[]Prompt {
data, err := ioutil.ReadFile("prompt.yml")
data, err := os.ReadFile("prompt.yml")
if err != nil {
log.Fatal(err)
}
Expand Down
3 changes: 1 addition & 2 deletions public/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"crypto/sha256"
"encoding/base64"
"fmt"
"io/ioutil"
"os"
"strings"
"time"
Expand All @@ -23,7 +22,7 @@ func WriteToFile(path string, data []byte) error {
if err != nil {
return err
}
err = ioutil.WriteFile(path, data, 0755)
err = os.WriteFile(path, data, 0755)
if err != nil {
return err
}
Expand Down

0 comments on commit ca1aad9

Please sign in to comment.