Skip to content

Commit 9baafb2

Browse files
committed
Un-export GetFreePort
1 parent 8e07bee commit 9baafb2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

database/postgres/postgres.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func Open() (string, func(), error) {
2525
}
2626
// Pick an explicit port on the host to connect to 5432.
2727
// This is necessary so we can configure the port to only use ipv4.
28-
port, err := GetFreePort()
28+
port, err := getFreePort()
2929
if err != nil {
3030
return "", nil, xerrors.Errorf("Unable to get free port: %w", err)
3131
}
@@ -94,8 +94,8 @@ func Open() (string, func(), error) {
9494
}, nil
9595
}
9696

97-
// GetFreePort asks the kernel for a free open port that is ready to use.
98-
func GetFreePort() (port int, err error) {
97+
// getFreePort asks the kernel for a free open port that is ready to use.
98+
func getFreePort() (port int, err error) {
9999
var address *net.TCPAddr
100100
// Binding to port 0 tells the OS to grab a port for us:
101101
// https://stackoverflow.com/questions/1365265/on-localhost-how-do-i-pick-a-free-port-number

0 commit comments

Comments
 (0)