# For issue golang.org/issue/41084 [short] skip ! go test -v examplegoexit stdout '(?s)--- PASS.*--- FAIL.*' stdout 'panic: test executed panic\(nil\) or runtime\.Goexit' -- go.mod -- module examplegoexit go 1.16 -- example_test.go -- package main import ( "fmt" "runtime" ) func ExamplePass() { fmt.Println("pass") // Output: // pass } func ExampleGoexit() { runtime.Goexit() // Output: }