We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
template := "http://{{host}}/?q={{query}}&foo={{bar}}" t := fasttemplate.New(template, "{{", "}}") s1 := t.ExecuteString(map[string]interface{}{ "host": "google.com", "query": url.QueryEscape("hello=world"), "bar": 22, })
In my case, there are always int/bool/float type to template.
Error:
panic: tag="bar" contains unexpected value type=22. Expected []byte, string or TagFunc
The text was updated successfully, but these errors were encountered:
There are two options exist:
Another option is to use quicktemplate instead. It supports int and float out of the box, while bool template may be easily implemented with it.
Sorry, something went wrong.
No branches or pull requests
In my case, there are always int/bool/float type to template.
Error:
The text was updated successfully, but these errors were encountered: