Standard library / testing
testing.InternalExample
Descriptor for a named example, its expected output and optional unordered comparison; internal harness representation only. Expected stdout: 'Example true false\n'.
Formal Syntax & Structure
go syntaxgo
type InternalExample struct { Name string F func() Output string Unordered bool}Working Example
Example Snippetgo
package main
import ( "fmt" "testing")
func main() { d := testing.InternalExample{Name: "Example", F: func() {}, Output: "demo\n", Unordered: false} fmt.Println(d.Name, d.F != nil, d.Unordered)}