utils

package
v0.0.0-...-540bb61 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomString

func RandomString(n int) string

RandomString generates random string

func RandomStringFrom

func RandomStringFrom(n int, base []rune) string

RandomStringFrom generates random string from base runes

func Retry

func Retry(retries int, interval time.Duration, action func() error) error

Retry retries action with defined intervals

Types

type IntList

type IntList []int

IntList extended []int definition

func (IntList) Has

func (i IntList) Has(expected int) bool

Has check if int is in list

type StringList

type StringList []string

StringList extended []string definition

func (StringList) Append

func (s StringList) Append(i ...string) StringList

Append add items to the list

func (StringList) Has

func (s StringList) Has(i string) bool

Has return true if item is on the list

func (StringList) Remove

func (s StringList) Remove(i ...string) StringList

Remove items from the list

func (StringList) Sort

func (s StringList) Sort() StringList

func (StringList) Unique

func (s StringList) Unique() StringList

type Temporary

type Temporary interface {
	Temporary() bool
}

Temporary define if error implements temporary interface

Jump to

Keyboard shortcuts

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