Created
October 26, 2018 15:05
-
-
Save jlindsey/fceb0b682fc8d63129cb6129c0d17da5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<body> | |
<h1>Body</h1> | |
{{template "test"}} | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"os" | |
"html/template" | |
) | |
func main() { | |
tmpl := template.Must(template.ParseFiles("./arts.html", "./test.html")) | |
tmpl.Execute(os.Stdout, nil) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<body> | |
<h1>Body</h1> | |
<h1>Hello, test!</h1> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{define "test"}} | |
<h1>Hello, test!</h1> | |
{{end}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment