add port in PostgreSQL connection example

This commit is contained in:
PapEr 2017-10-22 04:06:25 -05:00 committed by GitHub
parent 263ef914f1
commit 514a9d84c3

View File

@ -44,7 +44,7 @@ import (
)
func main() {
db, err := gorm.Open("postgres", "host=myhost user=gorm dbname=gorm sslmode=disable password=mypassword")
db, err := gorm.Open("postgres", "host=myhost port=myport user=gorm dbname=gorm sslmode=disable password=mypassword")
defer db.Close()
}
```