feat: 基础信息

This commit is contained in:
mei
2025-10-06 21:05:06 +08:00
parent 5566c929c8
commit 1d153274f4
8 changed files with 56 additions and 8 deletions
+8
View File
@@ -6,6 +6,7 @@ import (
)
type Config struct {
Basic Basic `json:"basic"`
SignalSecret string `json:"signal_secret"`
Debug bool `json:"debug"`
DisconnectDuration int `json:"disconnect_duration"` // Hours
@@ -35,6 +36,13 @@ type GithubConfig struct {
Token string `json:"token"`
}
type Basic struct {
Name string `json:"name"`
Age int `json:"age"`
QQNumber string `json:"qq_number"`
CauseStop string `json:"cause_stop"`
}
func GetConfig() (config Config, err error) {
content, err := os.ReadFile("config.json")
if err != nil {