util

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAuthenticationFailed = errors.New("authentication failed")
View Source
var ErrInvalidFilter = errors.New("invalid filter syntax")
View Source
var ErrNetworkFailure = errors.New("network error")
View Source
var ErrNothingReturned = errors.New("nothing returned")
View Source
var ErrOperationFailed = errors.New("query failed")
View Source
var ErrQuotaExceeded = errors.New("quota limit exceed")
View Source
var ErrUbiquitousResults = errors.New("ubiquitous response")

Functions

func FormatError

func FormatError(err error) error

func GetExecutablePath

func GetExecutablePath() string

Get path of the executable that started current gr process.

func Handle

func Handle(err error) error

func Hexify

func Hexify(s string) string

func LookupAddress

func LookupAddress(address string) string

Resolve Internet Protocol address to domain name

func NewGUID

func NewGUID() string

func RebuildStringSliceFlag

func RebuildStringSliceFlag(flags []string, delimiter rune) ([]string, error)

Parse string slice or string array flags by using custom csv reader

func SkipOAT

func SkipOAT(t testing.TB)

func Time1601

func Time1601() time.Time

func TimeAfter1601

func TimeAfter1601(offset int64) time.Time

Retrieve date by applying offset. It should be in 0.1 µs

func TimeSince1601

func TimeSince1601() time.Duration

func ToTitleNoLower

func ToTitleNoLower(in string) string

Convert English words to title case (prevent lowercasing)

func Unhexify

func Unhexify(s string) string

func Validate

func Validate() *validator.Validate

Types

type ValidatorInterface

type ValidatorInterface interface {
	IsValid() bool
}

Jump to

Keyboard shortcuts

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