mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
@@ -138,5 +138,7 @@ func getFreePort() (port int, err error) {
|
||||
}
|
||||
|
||||
defer listener.Close()
|
||||
// This is always a *net.TCPAddr.
|
||||
// nolint:forcetypeassert
|
||||
return listener.Addr().(*net.TCPAddr).Port, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user