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.
Click to show internal directories.
Click to hide internal directories.