util

package
v0.0.0-...-3015c2b Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZeroDuration = Duration{time.Duration(0)}

Functions

func ContainsAll

func ContainsAll(sup, sub []string) (bool, []string)

ContainsAll determines if sup is a superset of sub. The first return value is a flag, and the second is the set of values which are missing from sup.

func MakeID

func MakeID() (string, error)

func RunParallel

func RunParallel(tasks ...func()) *sync.WaitGroup

func RunParallelArgs

func RunParallelArgs(task func(string), args ...string)

func UnmarshalStringList

func UnmarshalStringList(raw json.RawMessage) ([]string, error)

Types

type Duration

type Duration struct {
	time.Duration
}

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (Duration) String

func (d Duration) String() string

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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