Skip to content

Commit

Permalink
修复数据库配置读取错误
Browse files Browse the repository at this point in the history
  • Loading branch information
iyear committed Mar 31, 2020
1 parent 74e4096 commit b3a0125
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func init() {
host := viper.GetString("mysql.host")
user := viper.GetString("mysql.user")
port := viper.GetString("mysql.port")
pwd := viper.GetString("mysql.user")
pwd := viper.GetString("mysql.password")
database := viper.GetString("mysql.database")
path := strings.Join([]string{user, ":", pwd, "@tcp(", host, ":", port, ")/", database, "?charset=utf8"}, "")
//fmt.Println(path)
Expand Down

0 comments on commit b3a0125

Please sign in to comment.