Files
saasapi/cmd/saastool/config.go
2025-04-02 19:34:36 +08:00

20 lines
363 B
Go

package main
import (
"e.coding.net/rta/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
}