669 B
669 B
- 14:09 quick capture: Hello GPT-4o | OpenAI
- 14:12 quick capture: GPT-4o
- Per eseguire un template incluso in un eseguibile #golang (embed)
-
package main import ( "embed" "os" "text/template" ) //go:embed templates/*.tmpl var templatesFolder embed.FS func main() { tmpl, err := template.ParseFS(templatesFolder, "templates/*.tmpl") if err != nil { panic(err) } err = tmpl.Execute(os.Stdout, map[string]string{"Name": "Andrea"}) if err != nil { panic(err) } }
-