diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-02-29 11:23:13 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-02-29 11:23:13 +0100 |
| commit | b6d7097a0d6072199f2cd74d67404890697cf78a (patch) | |
| tree | a2193c528a79fd5606507568859ee5067c6b86e4 /src/pkg/text/template/example_test.go | |
| parent | 4cecda6c347bd6902b960c6a35a967add7070b0d (diff) | |
| download | golang-b6d7097a0d6072199f2cd74d67404890697cf78a.tar.gz | |
Imported Upstream version 2012.02.22upstream-weekly/2012.02.22
Diffstat (limited to 'src/pkg/text/template/example_test.go')
| -rw-r--r-- | src/pkg/text/template/example_test.go | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/src/pkg/text/template/example_test.go b/src/pkg/text/template/example_test.go index b7701ea26..ad49514a8 100644 --- a/src/pkg/text/template/example_test.go +++ b/src/pkg/text/template/example_test.go @@ -10,28 +10,6 @@ import ( "text/template" ) -// Dear Aunt Mildred, -// -// It was a pleasure to see you at the wedding. -// Thank you for the lovely bone china tea set. -// -// Best wishes, -// Josie -// -// Dear Uncle John, -// -// It is a shame you couldn't make it to the wedding. -// Thank you for the lovely moleskin pants. -// -// Best wishes, -// Josie -// -// Dear Cousin Rodney, -// -// It is a shame you couldn't make it to the wedding. -// -// Best wishes, -// Josie func ExampleTemplate() { // Define a template. const letter = ` @@ -66,4 +44,28 @@ Josie log.Println("executing template:", err) } } + + // Output: + // Dear Aunt Mildred, + // + // It was a pleasure to see you at the wedding. + // Thank you for the lovely bone china tea set. + // + // Best wishes, + // Josie + // + // Dear Uncle John, + // + // It is a shame you couldn't make it to the wedding. + // Thank you for the lovely moleskin pants. + // + // Best wishes, + // Josie + // + // Dear Cousin Rodney, + // + // It is a shame you couldn't make it to the wedding. + // + // Best wishes, + // Josie } |
