Update config.go

This commit is contained in:
公明 2025-02-27 16:24:17 +08:00 committed by GitHub
parent 32f2449452
commit f27bc60ef3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,14 +3,13 @@ package config
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
)
// 配置结构
type Config struct {
AI string `json:"AI"`
Cookie2 string `json:"cookie2"`
Headers2 map[string]string `json:"headers2"`
Suffixes []string `json:"suffixes"`
AllowedRespHeaders []string `json:"allowedRespHeaders"`
APIKeys struct {
@ -63,7 +62,7 @@ var Prompt = `{"role": "你是一个AI负责通过比较两个HTTP响应数
// 加载配置文件
func loadConfig(filePath string) error {
data, err := ioutil.ReadFile(filePath)
data, err := os.ReadFile(filePath)
if err != nil {
return err
}