sidekick

package module
v0.0.0-...-d4debf3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2016 License: MIT Imports: 4 Imported by: 0

README

sidekick

Some Golang test helper flag and functions

Doc: https://godoc.org/github.com/bom-d-van/sidekick

Documentation

Overview

Package sidekick implements some Go test helper flags and functions.

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	// Debug is similar to testing.Verbose. Set to true when using flag
	// -debug.
	Debug bool
)

Functions

func SkipCase

func SkipCase(c interface{}) bool

SkipCase checks if a test case should be run based on flags -skip or -case. SkipCase compares values in string form, you can pass in value has fmt.Stringer or any other interfaces that package fmt has supported.

Example
// skip case or cases: go test -skip 1 -skip 2 --> skip case 1 and 2
// Or: go test -case 1 -case 2 --> run case 1 and 2
for i, c := range cases {
	if SkipCase(i) {
		continue
	}
	// you can filter cases not needed when debugging tests
	_ = c
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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