csx 3 years ago
parent
commit
483e5b1aa4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      service/ms_db.go

+ 1 - 0
service/ms_db.go View File

38
 func ConnectMSDB() {
38
 func ConnectMSDB() {
39
 	connectionString := fmt.Sprintf("server=%s;user id=%s;password=%s;port=%d;database=%s",
39
 	connectionString := fmt.Sprintf("server=%s;user id=%s;password=%s;port=%d;database=%s",
40
 		host, user, password, port, dbname)
40
 		host, user, password, port, dbname)
41
+	fmt.Println(connectionString)
41
 	db, err := gorm.Open("mssql", connectionString)
42
 	db, err := gorm.Open("mssql", connectionString)
42
 	if err != nil {
43
 	if err != nil {
43
 		fmt.Println("failed to connect database")
44
 		fmt.Println("failed to connect database")