From 9f2fb091576320b6315a9d5d9e19efb5f0ef3cea Mon Sep 17 00:00:00 2001 From: govolokatliai Date: Tue, 20 May 2025 09:07:23 +0800 Subject: [PATCH] Amend --- config/config.go | 4 ++-- config/model.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index c09bf1b..ce727a6 100644 --- a/config/config.go +++ b/config/config.go @@ -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") diff --git a/config/model.go b/config/model.go index 9f33a67..7e758f5 100644 --- a/config/model.go +++ b/config/model.go @@ -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"`