Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 14, 2021 01:15 pm GMT

go-portfinder: Go implementation of npm portfinder

Go implementation of npm portfinder. A simple tool to find an open port on the current machine.

Installation

$ go get github.com/pgollang/go-portfinder

Usage

package mainimport (    "github.com/pgollang/go-portfinder")func main(){     // scans and returns first open port on all network interfaces of current machine.     openPort, err := portfinder.GetPort(&PortFinderOptions {         StartPort: 9090,         StopPort: 9099     })}

Repo: https://github.com/pgollangi/go-portfinder


Original Link: https://dev.to/pgollangi/go-portfinder-go-implementation-of-npm-portfinder-52jm

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To