mirror of
https://github.com/ZSCNetSupportDept/scheduler.git
synced 2025-10-28 04:25:03 +08:00
Amend
This commit is contained in:
@@ -13,7 +13,7 @@ func Load() {
|
||||
|
||||
parseArgs()
|
||||
readconfig()
|
||||
fmt.Println(Default)
|
||||
fmt.Printf("%+v\n", Default)
|
||||
|
||||
carbon.SetDefault(carbon.Default{
|
||||
Layout: carbon.DateTimeLayout,
|
||||
@@ -35,7 +35,7 @@ func readconfig() {
|
||||
}
|
||||
|
||||
func parseArgs() {
|
||||
pflag.String("config", "config.yaml", "the path to config file.")
|
||||
pflag.String("config", "./config.yaml", "the path to config file.")
|
||||
viper.BindPFlags(pflag.CommandLine)
|
||||
pflag.Parse()
|
||||
pathToConfigure = viper.GetString("config")
|
||||
|
||||
@@ -7,7 +7,7 @@ type Config struct {
|
||||
File string `mapstructure:"File"`
|
||||
} `mapstructure:"app"`
|
||||
DB struct {
|
||||
Type string `mapstructure:"Tyoe"`
|
||||
Type string `mapstructure:"Type"`
|
||||
Path string `mapstructure:"Path"`
|
||||
Port int `mapstructure:"Port"`
|
||||
User string `mapstructure:"User"`
|
||||
|
||||
Reference in New Issue
Block a user