Standard library / testing
testing.Short()
Return whether -short was requested; use it to skip costly optional tests. Expected stdout: 'false\nPASS\n'. Run as a _test.go file using the Go test harness.
Formal Syntax & Structure
go syntaxgo
func Short() boolReturn Value
bool
Result of the operation described above.
Working Example
Example Snippetgo
package main
import ( "fmt" "testing")
func TestReference(t *testing.T) { fmt.Println(testing.Short()) }