func mainPage(w http.ResponseWriter, r *http.Request) { p, _ := os.Getwd() os.Setenv("TALLER_PATH", p+"/taller") template := taller.NewTemplateFile("index.html") context := taller.Context{"c": os.Getenv("TALLER_PATH")} content := taller.Render(template, context) io.WriteString(w, string(content)) }
func main() { os.Setenv("TALLER_PATH", "/home/rif/Documents/prog/go/src/cmd") println(string(taller.Render(taller.NewTemplateFile("template.html"), taller.Context{}))) }