utils

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LineToSlice added in v0.8.1

func LineToSlice(s string) []string

LineToSlice converts POSIX line breaks to a string slice

func MergeMap

func MergeMap(data map[string]string, resultTo interface{}) error

MergeMap copy keys from a `data` map to a `resultTo` tagged object

func SendToSocket

func SendToSocket(socket string, command string) error

SendToSocket send strings to a unix socket specified

func SizeSuffixToInt64

func SizeSuffixToInt64(size string) (int64, error)

SizeSuffixToInt64 converts a size in string format with suffix into int64

func Split added in v0.8.1

func Split(s, sep string) []string

Split returns a slice of substrings from s, separated by sep. If s is empty, Split returns an empty slice. Split will also TrimSpace() all resulting substrings.

Types

type Tick added in v0.8.1

type Tick struct {
	Event string
	When  time.Time
}

Tick ...

type Timer added in v0.8.1

type Timer struct {
	Start time.Time
	Ticks []*Tick
}

Timer ...

func NewTimer added in v0.8.1

func NewTimer() *Timer

NewTimer ...

func (*Timer) AsString added in v0.8.1

func (t *Timer) AsString(totalLabel string) string

AsString ...

func (*Timer) Tick added in v0.8.1

func (t *Timer) Tick(eventLabel string)

Tick ...

Jump to

Keyboard shortcuts

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