Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package main
import (
func main() {
type PersonalData struct {
Name string
Mail string
p := PersonalData{"おれです", ""}
var b bytes.Buffer
tpl, _ := template.ParseFiles("personal_data.tmpl")
tpl.Execute(&b, p)
// Name: おれです
// Mail:
Name: {{ .Name }}
Mail: {{ .Mail }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment