Commit af94421 1 parent 7cde066 commit af94421 Copy full SHA for af94421
File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -80,17 +80,19 @@ func getPgHost() string {
80
80
81
81
// nolint: unparam
82
82
func getDBURI () (string , error ) {
83
+ user := url .QueryEscape (config .YataiConfig .Postgresql .User )
83
84
password := url .QueryEscape (config .YataiConfig .Postgresql .Password )
85
+ database := url .QueryEscape (config .YataiConfig .Postgresql .Database )
84
86
sslMode := "disable"
85
87
if config .YataiConfig .Postgresql .SSLMode != "" {
86
88
sslMode = config .YataiConfig .Postgresql .SSLMode
87
89
}
88
90
uri := fmt .Sprintf ("postgres://%s:%s@%s:%d/%s?sslmode=%s" ,
89
- config . YataiConfig . Postgresql . User ,
91
+ user ,
90
92
password ,
91
93
getPgHost (),
92
94
config .YataiConfig .Postgresql .Port ,
93
- config . YataiConfig . Postgresql . Database ,
95
+ database ,
94
96
sslMode )
95
97
return uri , nil
96
98
}
You can’t perform that action at this time.
0 commit comments