]> Cypherpunks repositories - gostls13.git/commitdiff
exp/template: fix Must example.
authorDavid Symonds <dsymonds@golang.org>
Mon, 8 Aug 2011 05:38:37 +0000 (15:38 +1000)
committerDavid Symonds <dsymonds@golang.org>
Mon, 8 Aug 2011 05:38:37 +0000 (15:38 +1000)
R=r
CC=golang-dev
https://golang.org/cl/4839052

src/pkg/exp/template/helper.go

index 89ec0e363fcbce14996dac41327d0061a7ff03d5..ae6a057eef9886b35c4bd3a76811ed49e3037148 100644 (file)
@@ -18,7 +18,7 @@ import (
 // Must is a helper that wraps a call to a function returning (*Template, os.Error)
 // and panics if the error is non-nil. It is intended for use in variable initializations
 // such as
-//     var t = template.Must(template.Parse("text"))
+//     var t = template.Must(template.New("name").Parse("text"))
 func Must(t *Template, err os.Error) *Template {
        if err != nil {
                panic(err)