tree: 7b4d4d665a17739016e79cf6e8be49a07ac59cbe [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. shadow_predeclared.go
  19. shadow_predeclared.golden
  20. values.go
  21. values.golden
  22. whole_file.go
  23. whole_file.golden
  24. whole_function.go
  25. whole_function.golden
  26. whole_function_external.go
  27. 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.