Fix package rac's examples for godoc convention

This commit is contained in:
Nigel Tao committed 2019-08-05 12:53:15 +10:00
1 parent 89c2bf655c
commit 774744d2f3
1 file changed
+7 -6
+7 -6
View File
@@ -28,14 +28,14 @@ import (
"github.com/google/wuffs/lib/rac" "github.com/google/wuffs/lib/rac"
) )
// ExampleILAEnd demonstrates using the low level "rac" package to encode a // Example_indexLocationAtEnd demonstrates using the low level "rac" package to
// RAC+Zlib formatted file with IndexLocationAtEnd. // encode a RAC+Zlib formatted file with IndexLocationAtEnd.
// //
// The sibling "raczlib" package provides a higher level API that is easier to // The sibling "raczlib" package provides a higher level API that is easier to
// use. // use.
// //
// See the RAC specification for an explanation of the file format. // See the RAC specification for an explanation of the file format.
func ExampleILAEnd() { func Example_indexLocationAtEnd() {
// Manually construct a zlib encoding of "More!\n", one that uses a literal // Manually construct a zlib encoding of "More!\n", one that uses a literal
// block (that's easy to see in a hex dump) instead of a more compressible // block (that's easy to see in a hex dump) instead of a more compressible
// Huffman block. // Huffman block.
@@ -90,14 +90,15 @@ func ExampleILAEnd() {
// 00000030 00 00 00 01 01 |.....| // 00000030 00 00 00 01 01 |.....|
} }
// ExampleILAStart demonstrates using the low level "rac" package to encode and // Example_indexLocationAtStart demonstrates using the low level "rac" package
// then decode a RAC+Zlib formatted file with IndexLocationAtStart. // to encode and then decode a RAC+Zlib formatted file with
// IndexLocationAtStart.
// //
// The sibling "raczlib" package provides a higher level API that is easier to // The sibling "raczlib" package provides a higher level API that is easier to
// use. // use.
// //
// See the RAC specification for an explanation of the file format. // See the RAC specification for an explanation of the file format.
func ExampleILAStart() { func Example_indexLocationAtStart() {
buf := &bytes.Buffer{} buf := &bytes.Buffer{}
w := &rac.Writer{ w := &rac.Writer{
Writer: buf, Writer: buf,