Skip to content

Commit

Permalink
Correct compile fail, use .Lookup correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmallard committed Jul 2, 2017
1 parent 483889c commit fe85a5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions en/07.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,13 @@ func main() {

templates, err = template.ParseFiles(allFiles...) #parses all .tmpl files in the 'templates' folder

s1, _ := templates.LookUp("header.tmpl")
s1 := templates.Lookup("header.tmpl")
s1.ExecuteTemplate(os.Stdout, "header", nil)
fmt.Println()
s2, _ := templates.LookUp("content.tmpl")
s2 := templates.Lookup("content.tmpl")
s2.ExecuteTemplate(os.Stdout, "content", nil)
fmt.Println()
s3, _ := templates.LookUp("footer.tmpl")
s3 := templates.Lookup("footer.tmpl")
s3.ExecuteTemplate(os.Stdout, "footer", nil)
fmt.Println()
s3.Execute(os.Stdout, nil)
Expand Down
6 changes: 3 additions & 3 deletions es/07.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ Código:
templates, err = template.ParseFiles(allFiles...) #parses all .tmpl files in the 'templates' folder
s1, _ := templates.LookUp("header.tmpl")
s1 := templates.Lookup("header.tmpl")
s1.ExecuteTemplate(os.Stdout, "header", nil)
fmt.Println()
s2, _ := templates.LookUp("content.tmpl")
s2 := templates.Lookup("content.tmpl")
s2.ExecuteTemplate(os.Stdout, "content", nil)
fmt.Println()
s3, _ := templates.LookUp("footer.tmpl")
s3 := templates.Lookup("footer.tmpl")
s3.ExecuteTemplate(os.Stdout, "footer", nil)
fmt.Println()
s3.Execute(os.Stdout, nil)
Expand Down

0 comments on commit fe85a5c

Please sign in to comment.