feat 添加读取数据库配置
This commit is contained in:
parent
a86156659d
commit
f53ff1cc7f
@ -17,6 +17,8 @@ type DBOption struct {
|
|||||||
const (
|
const (
|
||||||
// 默认的数据库配置文件路径
|
// 默认的数据库配置文件路径
|
||||||
DefaultConfigPath = "/cfg/db.yaml"
|
DefaultConfigPath = "/cfg/db.yaml"
|
||||||
|
// 数据库配置文件路径环境变量
|
||||||
|
ConfigPathEnvKey = "DB_CONFIG_PATH"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LoadDBConfig(path string) (*DBOption, error) {
|
func LoadDBConfig(path string) (*DBOption, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user