buildtest

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Data

func Data(relpath string) ([]byte, error)

func DataAs

func DataAs(relpath string, obj interface{}) error

func PrettyJSON

func PrettyJSON(x interface{}) (string, error)

func WaitNop

func WaitNop()

A convenience for passing into WaitUntil

func YAMLToJSON

func YAMLToJSON(y []byte) ([]byte, error)

Types

type Wait

type Wait struct {
	sync.WaitGroup
}

This extends WaitGroup with a few useful methods to avoid tests having a failure mode of hanging.

func NewWait

func NewWait() *Wait

A convenience for creating a "wait" object.

func (*Wait) Add

func (w *Wait) Add(delta int)

Override Add so folks don't call it.

func (*Wait) In

func (w *Wait) In(d time.Duration)

This calls Done() after the specified duration.

func (*Wait) WaitUntil

func (w *Wait) WaitUntil(d time.Duration, onSuccess func(), onTimeout func())

This waits until Done() has been called or the specified duration has elapsed. If Done() is called, then onSuccess is called. If the duration elapses without Done() being called, then onTimeout is called.

Jump to

Keyboard shortcuts

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