util

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyArray

func CopyArray(data []byte, pos int, length int) []byte

CopyArray returns copied array

func GetAppPath

func GetAppPath() (string, error)

GetAppPath returns current parogram path

func GetDuration

func GetDuration(seconds int64) string

GetDuration returns long to string format

func GetScouterPath

func GetScouterPath() string

func Hash

func Hash(bytes []byte) int32

Hash returns int hash value

func HashString

func HashString(v string) int32

HashString retrun string hash

func HashUint

func HashUint(s string) uint32

HashUint returns string hash

func IntToXlogString32

func IntToXlogString32(num int64) string

func IpToBytes

func IpToBytes(ip string) []byte

func MakeDir

func MakeDir(path string)

MakeDir makes dir given path.

func MillisBetween

func MillisBetween(from time.Time, to time.Time) int32

func MillisToNow

func MillisToNow(from time.Time) int32

func ReadFile

func ReadFile(file string) string

ReadFile returns file contents to string

func RoundUp

func RoundUp(input float64, places int) float64

RoundUp returns round float

func TimeToMillis

func TimeToMillis(t time.Time) int64

Types

type CommaSeparatedChainedStrMatcher

type CommaSeparatedChainedStrMatcher struct {
	// contains filtered or unexported fields
}

func NewCommaSeparatedChainedStrMatcher

func NewCommaSeparatedChainedStrMatcher(patterns string) CommaSeparatedChainedStrMatcher

func (CommaSeparatedChainedStrMatcher) IsMatch

func (m CommaSeparatedChainedStrMatcher) IsMatch(target string) bool

type StrMatch

type StrMatch struct {
	Pattern string
	// contains filtered or unexported fields
}

func NewStrMatch

func NewStrMatch(pattern string) StrMatch

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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