func Home(w http.ResponseWriter, r *http.Request) { if r.URL.Path != "/" { fmt.Fprintln(w, "404 page not found") return } for i := 0; i < 34; i++ { user := List{ProductsList: string(products.AccessDataFromFile(i))} HomeTmpl.Execute(w, user) } } >>>>>>>> This is the HTML file <body> <h1>{{ (index . 0).ProductsList }}</h1> </body>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)