transfer.sh/vendor/cloud.google.com/go/internal/snipdoc
Andrea Spacca 82493d6dcb add GDrive provider support (#118)
* GDrive provider support
* More reliable basedir ownership
* Fix mimetype
2018-06-19 15:30:26 +02:00
..
README.md add GDrive provider support (#118) 2018-06-19 15:30:26 +02:00
sample-makefile add GDrive provider support (#118) 2018-06-19 15:30:26 +02:00
snipdoc.awk add GDrive provider support (#118) 2018-06-19 15:30:26 +02:00

Snipdoc

Snipdoc is a simple tool for maintaining package documentation that contains code samples.

  1. Create a subdirectory of your package to hold the following files. "internal" is a good name.

  2. Write a template file (for example, "doc.template") with the text of your package documentation. The file should look exactly like you want your doc.go file to look, except for code snippets. Instead of embedding a code snippet, write a line consisting solely of

[NAME]

for your choice of NAME.

  1. Write a snippets file (for example, "doc-snippets.go") as a valid Go source file. Begin each snippet you'd like to appear in your package docs with //[ NAME and end it with //].

  2. Construct your doc.go file with the command

    awk -f snipdoc.awk doc-snippets.go doc.template
    

    The file "sample-makefile" in this directory verifies that the snippets file compiles and safely constructs a doc.go file.