tree: 90b7329409b22bf34c4480a4f5fda8ee76da5f7c [path history] [tgz]
  1. empty.go
  2. empty.golden
  3. generic_constraints.go
  4. generic_constraints.golden
  5. import_groups.go
  6. import_groups.golden
  7. import_groups_named.go
  8. import_groups_named.golden
  9. inspect_signature.go
  10. inspect_signature.golden
  11. iota.go
  12. iota.golden
  13. issue43658.go
  14. issue43658.golden
  15. multiple.go
  16. multiple.golden
  17. README.md
  18. values.go
  19. values.golden
  20. whole_file.go
  21. whole_file.golden
  22. whole_function.go
  23. whole_function.golden
  24. whole_function_external.go
  25. whole_function_external.golden
src/go/doc/testdata/examples/README.md

These files are processed by example_test.go:TestExamples.

A .golden file is a txtar file with two sections for each example that should be created by doc.Examples from the corresponding .go file.

One section, named EXAMPLE_NAME.Output, contains the example's output, the value of the field Example.Output.

The other, named EXAMPLE_NAME.Play, contains the formatted code for a playable version of the example, the value of the field Example.Play.

If a section is missing, it is treated as being empty.