Discover Packages
github.com/pbogut/freeport
command
module
Version:
v0.0.0-...-1b24ce0
Opens a new window with list of versions in this module.
Published: Sep 18, 2022
License: BSD-3-Clause
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
freeport is a simple Go package for finding free TCP ports
This is a more up-to-date hard fork of https://github.com/phayes/freeport
It has https://github.com/phayes/freeport/pull/8 merged, the CLI removed (Go package only), and other minor improvements.
PRs welcome and appreciated.
Usage
package main
import "github.com/slimsag/freeport"
func main() {
port, err := freeport.GetFreePort()
if err != nil {
log.Fatal(err)
}
// port should be ready to listen on
}
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.