Relative Content

Tag Archive for arraysgotemplates

passing an array to a templ file

I want to pass an array from a main go file into a templ file. I have everything up and running correctly except being able to get the array in the templ file. I can’t find the syntax to do this anywhere. I want to pass an array called content to the templ file, right now i have return Start(c, http.StatusOK, Finished(content)) to pass the array to the file. here is the code for the templ file templ Finished(content ) { Please let me know what to put in after content.