Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Data ¶
func Data(relpath string) ([]byte, error)
Data returns the contents of a file at the given path.
func DataAs ¶
func DataAs(relpath string, obj interface{}) error
DataAs interprets the YAML contents of the file at the given path as the given type.
func PrettyJSON ¶
func PrettyJSON(x interface{}) (string, error)
PrettyJSON pretty-prints a struct to a string.
func YAMLToJSON ¶
func YAMLToJSON(y []byte) ([]byte, error)
YAMLToJSON converts the given YAML bytes to JSON bytes.
Types ¶
type Wait ¶
type Wait struct {
sync.WaitGroup
}
Wait extends WaitGroup with a few useful methods to avoid tests having a failure mode of hanging.
func (*Wait) WaitUntil ¶
func (w *Wait) WaitUntil(d time.Duration, onSuccess func(), onTimeout func())
WaitUntil 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.
Click to show internal directories.
Click to hide internal directories.