Hi,
I want to access a config file variable in HTML file. Can anyone suggest me how to do this?
Thanks in advance.
Hi,
I want to access a config file variable in HTML file. Can anyone suggest me how to do this?
Thanks in advance.
This is usually done though a templating system like https://godoc.org/html/template. Pass the variables you need (in a data structure) when executing the template. The placeholders in the template will be replaced with properly escaped values from the specified variables.
@nathankerr, Thanks.but one problem, I am getting the value in the terminal but I am unable to get it on the browser.Please suggest.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.