-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Comments
You should use a separate html file and the package ".html/template". You
will a nice example here, https://golang.org/doc/articles/wiki/
João Henrique Machado Silva
+31 06 40868680
Skype joaoh82
TWITTER @joaoh82
INSTAGRAM @josh.bh
ABOUT ME https://about.me/joaoh82
…On Wed, Mar 14, 2018 at 8:34 AM, MK-Twinkle ***@***.***> wrote:
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#29>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAMuhTCMIoWfCmR3TsB-gHeLi9obvouzks5teMf4gaJpZM4Sp9Ln>
.
|
Check out my repository, I had this problem and solved it by using template.JS I think.
http://gitHub.com/bubbajoe/netcode-golang
Look through the server.go file.
Joe Williams
On Mar 14, 2018, at 3:46 AM, João Henrique Machado Silva <[email protected]<mailto:[email protected]>> wrote:
You should use a separate html file and the package ".html/template". You
will a nice example here, https://golang.org/doc/articles/wiki/
João Henrique Machado Silva
+31 06 40868680
Skype joaoh82
TWITTER @joaoh82
INSTAGRAM @josh.bh
ABOUT ME https://about.me/joaoh82
On Wed, Mar 14, 2018 at 8:34 AM, MK-Twinkle ***@***.******@***.***>> wrote:
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#29>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAMuhTCMIoWfCmR3TsB-gHeLi9obvouzks5teMf4gaJpZM4Sp9Ln>
.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#29 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHHhM3TJYCIQAJGtYqRmfbJP2EDou1U9ks5teMq-gaJpZM4Sp9Ln>.
|
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
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.
The text was updated successfully, but these errors were encountered: