DEV Community

Need helping looping over Go struct/array in .html file

Samuel Fuller on June 24, 2020

Hello, this is my first post and I am also a web development noob. I apologize if this issue is basic. I have a main.go file which conta...
Collapse
 
javapriyan profile image
Karthikeyan • Edited

I am not sure why do you need this to be in the script tag. Iterate the h1 as usual with the template. It does the magic

Collapse
 
ohhnate profile image
Samuel Fuller

Ahhhhhh I see what you mean. I've been thinking about templates all wrong. I'm pretty sure I can get it fixed now. Thank you for the advice.

Collapse
 
javapriyan profile image
Karthikeyan

I am glad that helped. Happy hacking