Default to localhost if not linux or BSD

This commit is contained in:
Matthew Wraith 2021-08-06 15:33:56 -07:00
parent 0fd7f79820
commit cf59ceac74
2 changed files with 6 additions and 6 deletions

View file

@ -53,12 +53,12 @@ func TestGetDriver(t *testing.T) {
func defaultConnString() string {
switch runtime.GOOS {
case "windows":
return "postgres://localhost:5432/foo"
case "linux":
return "postgres://:5432/foo?host=%2Fvar%2Frun%2Fpostgresql"
default:
case "darwin", "freebsd", "dragonfly", "openbsd", "netbsd":
return "postgres://:5432/foo?host=%2Ftmp"
default:
return "postgres://localhost:5432/foo"
}
}