Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOW TO USE HTML WITH GO #29

Open
MK-Twinkle opened this issue Mar 14, 2018 · 3 comments
Open

HOW TO USE HTML WITH GO #29

MK-Twinkle opened this issue Mar 14, 2018 · 3 comments

Comments

@MK-Twinkle
Copy link

I want to design a webpage using Go using HTML script. But I am quite unsure whether to use the HTML script directly to the Go source code or whether create a index.html in the similar directory. Can someone help me out with this.

@joaoh82
Copy link

joaoh82 commented Mar 14, 2018 via email

@bubbajoe
Copy link

bubbajoe commented Mar 14, 2018 via email

@jeremejazz
Copy link

using HTML source on Go code is portable yet not practical in terms of maintenance. As suggested, you should create a separate html template file and parse it using html/template. There are some libraries that also try to pack static html files into a binary that requires a little additional work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants