1
0
mirror of https://github.com/golang/go synced 2024-11-21 15:34:45 -07:00

exp/template: fix Must example.

R=r
CC=golang-dev
https://golang.org/cl/4839052
This commit is contained in:
David Symonds 2011-08-08 15:38:37 +10:00
parent 3c10403784
commit ec010fddb5

View 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)