From 1d59ae77e2d178439bc32f7ff1332b0292700db8 Mon Sep 17 00:00:00 2001 From: dustoair <107600816+dustoair@users.noreply.github.com> Date: Thu, 28 Jul 2022 19:10:02 +0800 Subject: [PATCH] GetString --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 9bff1a4..b1c74e5 100644 --- a/main.go +++ b/main.go @@ -20,7 +20,7 @@ import ( func InitDB() *gorm.DB { driverName := "mysql" host := viper.GetString("db.MySQLHOST") - port := viper.GetInt("db.MySQLPORT") + port := viper.GetString("db.MySQLPORT") database := viper.GetString("db.MySQLDB") username := viper.GetString("db.MySQLUSER") password := viper.GetString("db.MySQLPASSWORD")