...

Text file src/go/doc/testdata/examples/README.md

Documentation: go/doc/testdata/examples

     1These files are processed by example_test.go:TestExamples.
     2
     3A .golden file is a txtar file with two sections for each example that should be
     4created by doc.Examples from the corresponding .go file.
     5
     6One section, named EXAMPLE_NAME.Output, contains the example's output,
     7the value of the field Example.Output.
     8
     9The other, named EXAMPLE_NAME.Play, contains the formatted code for a playable
    10version of the example, the value of the field Example.Play.
    11
    12If a section is missing, it is treated as being empty.

View as plain text