mirror of
https://github.com/golang/go
synced 2024-11-24 23:57:57 -07:00
exp/template: fix Must example.
R=r CC=golang-dev https://golang.org/cl/4839052
This commit is contained in:
parent
3c10403784
commit
ec010fddb5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user