freeport

command module
v0.0.0-...-1b24ce0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

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
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL