package
0.0.0-20241221112132-06f9af878c14
Repository: https://github.com/brpaz/lib-go.git
Documentation: pkg.go.dev

# README

utils

import "github.com/brpaz/lib-go/utils"

Index

Variables

var ErrWaitTimeout = errors.New("timeout while waiting for resource")

func GetFreePort

func GetFreePort() (int, error)

GetFreePort returns a free port number on localhost.

func WaitFor

func WaitFor(address string, retryInternal time.Duration, maxRetryCount int) error

WaitFor helper function that waits until a specified network address become available. The retry count parameter specifies the maximum number of retries, until an error is returned. The retry interval specifies the duration between each attempt.

Generated by gomarkdoc