Documentation ¶
Index ¶
- func Atoi(v string, defaultValue int) int
- func Cut(s, sep string) (a, b string)
- func Env(name ...string) string
- func EnvDuration(name string, defaultValue time.Duration) time.Duration
- func ErrorString(err error) string
- func FileExists(name string) bool
- func FindFreePort(ip string, port int) int
- func Go(wg *sync.WaitGroup, f func())
- func GoChan[T any](ctx context.Context, wg *sync.WaitGroup, ch <-chan T, f func(elem T) error)
- func IsDir(dirInput string) bool
- func IsPortFree(ip string, port int) bool
- func OrSlice(a, b map[string]string) map[string]string
- func Pick1[T any](s T, _ ...any) T
- func RandPort(ip string, defaultPort int) int
- func RemoveCreateDir(folderPath string) error
- func Think(thinkTime, reason string)
- type DelayWorker
- type UniqueQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorString ¶
ErrorString returns the error string, err can be nil.
func FileExists ¶
func FindFreePort ¶
func IsPortFree ¶
func RemoveCreateDir ¶
RemoveCreateDir - create a directory structure, if still exist -> delete it before
Types ¶
type DelayWorker ¶
type DelayWorker[T any] struct { // contains filtered or unexported fields }
func NewDelayWorker ¶
func (*DelayWorker[T]) Notify ¶
func (s *DelayWorker[T]) Notify(t T)
type UniqueQueue ¶
func NewUniqueQueue ¶
func NewUniqueQueue(maxQueueSize int) *UniqueQueue
func (*UniqueQueue) Get ¶
func (q *UniqueQueue) Get() []string
func (*UniqueQueue) Put ¶
func (q *UniqueQueue) Put(value string)
Click to show internal directories.
Click to hide internal directories.