Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 992 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 992 Bytes

go-dynamic-port-allocator

Go CI CodeQL

A Go library for allocate ports, dynamically.

Example

import (
	...
	port "github.com/1eedaegon/go-dynamic-port-allocator"
	...
)

ports := port.Get(3)
// ports is something like []int{10000, 10001, 10002}

Or

import (
	...
	port "github.com/1eedaegon/go-dynamic-port-allocator"
	...
)

ports := port.GetS(3)
// ports is something like []string{"10000", "10001", "10002"}

License

MIT