Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umezawatakeshi/044aab7d929e75340312be112ac588b1 to your computer and use it in GitHub Desktop.
Save umezawatakeshi/044aab7d929e75340312be112ac588b1 to your computer and use it in GitHub Desktop.
Golang template テスト
m := map[string]string{
"a": "z",
"b": "",
}
t.Execute(os.Stdout, m)
go run . '{{ $x := "hoge\n" }}{{ $x }},{{ .a }} {{ if .b }}{{.b}}{{else}}b is false value{{end}}{{ "\n" }}'
hoge
,z b is false value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment