diff --git a/conn.go b/conn.go index bc098360..1eb09d3f 100644 --- a/conn.go +++ b/conn.go @@ -15,7 +15,6 @@ import ( "net" "os" "os/user" - "path" "path/filepath" "strconv" "strings" @@ -437,8 +436,8 @@ func dial(ctx context.Context, d Dialer, o values) (net.Conn, error) { func network(o values) (string, string) { host := o["host"] - if strings.HasPrefix(host, "/") { - sockPath := path.Join(host, ".s.PGSQL."+o["port"]) + if filepath.IsAbs(host) { + sockPath := filepath.Join(host, ".s.PGSQL."+o["port"]) return "unix", sockPath }