修改部分配置
This commit is contained in:
@@ -9,8 +9,8 @@ import (
|
||||
type AppConfig struct {
|
||||
Port int `yaml:"port"`
|
||||
Database DatabaseConfig `yaml:"database"`
|
||||
BitBrowser BitBrowserConfig `yaml:"bitBrowser"`
|
||||
AdsPower AdsPowerConfig `yaml:"adsPower"`
|
||||
WorkerID int64 `yaml:"workerID"`
|
||||
DatacenterID int64 `yaml:"datacenterID"`
|
||||
}
|
||||
|
||||
type DatabaseConfig struct {
|
||||
@@ -21,16 +21,6 @@ type DatabaseConfig struct {
|
||||
Database string `yaml:"database"`
|
||||
}
|
||||
|
||||
type BitBrowserConfig struct {
|
||||
ApiUrl string `yaml:"apiUrl"`
|
||||
ApiToken string `yaml:"apiToken"`
|
||||
}
|
||||
|
||||
type AdsPowerConfig struct {
|
||||
ApiUrl string `yaml:"apiUrl"`
|
||||
ApiToken string `yaml:"apiToken"`
|
||||
}
|
||||
|
||||
func LoadConfig() (*AppConfig, error) {
|
||||
// 读取文件内容
|
||||
data, err := os.ReadFile("config.yaml")
|
||||
|
||||
Reference in New Issue
Block a user