feat 添加读取数据库配置

This commit is contained in:
timerzz 2024-08-26 16:54:50 +08:00
parent a86156659d
commit f53ff1cc7f

View File

@ -17,6 +17,8 @@ type DBOption struct {
const (
// 默认的数据库配置文件路径
DefaultConfigPath = "/cfg/db.yaml"
// 数据库配置文件路径环境变量
ConfigPathEnvKey = "DB_CONFIG_PATH"
)
func LoadDBConfig(path string) (*DBOption, error) {