mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-02 23:40:24 +08:00
25 lines
438 B
Go
25 lines
438 B
Go
package config
|
|
|
|
import (
|
|
sysapp "mayfly-go/internal/sys/application"
|
|
|
|
"github.com/may-fly/cast"
|
|
)
|
|
|
|
const (
|
|
ConfigKeyFile string = "FileConfig" // 文件配置key
|
|
)
|
|
|
|
type FileConfig struct {
|
|
BasePath string // 文件基础路径
|
|
}
|
|
|
|
func GetFileConfig() *FileConfig {
|
|
c := sysapp.GetConfigApp().GetConfig(ConfigKeyFile)
|
|
jm := c.GetJsonMap()
|
|
|
|
fc := new(FileConfig)
|
|
fc.BasePath = cast.ToStringD(jm["basePath"], "./file")
|
|
return fc
|
|
}
|