This commit is contained in:
2026-04-17 19:56:22 +08:00
parent 592c8e31dd
commit aa2c3fb84d
8 changed files with 271 additions and 29 deletions

29
internal/conf/config.go Normal file
View File

@@ -0,0 +1,29 @@
package conf
import (
"os"
"strings"
)
type Config struct {
Hostname string
Account string
AccountID string
}
func Get() *Config {
host, _ := os.Hostname()
host = strings.ToLower(host)
switch host {
case "desktop-t5lh34v":
return &Config{Hostname: host, Account: "david", AccountID: "86037237"}
case "t8zznqs49f1ju7q":
return &Config{Hostname: host, Account: "liao", AccountID: "8889399698"}
case "dhzd0ojkpctafmm":
return &Config{Hostname: host, Account: "zhang", AccountID: "8889616198"}
case "f7tib45aqk4n10h":
return &Config{Hostname: host, Account: "long", AccountID: "8886508526"}
}
return nil
}