20 lines
362 B
Go
20 lines
362 B
Go
package main
|
|
|
|
import (
|
|
"git.algo.com.cn/public/saasapi/pkg/saashttp"
|
|
"github.com/BurntSushi/toml"
|
|
)
|
|
|
|
// Config 配置
|
|
type Config struct {
|
|
Auth saashttp.Auth
|
|
ApiUrls saashttp.ApiUrls
|
|
}
|
|
|
|
// LoadConfigFile 加载配置文件
|
|
func LoadConfigFile(filename string) (*Config, error) {
|
|
sc := &Config{}
|
|
_, err := toml.DecodeFile(filename, sc)
|
|
return sc, err
|
|
}
|