-
Notifications
You must be signed in to change notification settings - Fork 4
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
Nested template vars not being evaluated #4
Comments
@goharahmed sorry for the late reply, there is indeed issue here, the parsing process does not adapt well to float numbers (1.) and field reading. A simple solution would be to modify it to the following: $account["1"].server["1"].address The meanwhile, square brackets can effectively handle the distinction between keys that are numeric or string types too. |
Thank you so much for clarification. Still, the code base now has a PHP component which we would love to eliminate and switch to this library whenever possible. If you can only direct me to the file in this repo, plus some pointers as what you think will be needed to make it work, then I will spend some time to figure this patch out and possibly send a PR to you. Thanks for responding. |
@goharahmed We should have had a similar situation in the past. This project was originally developed to facilitate others to switch from PHP |
Hi,
Great library, thank you. Its working fine for the most part but when we've a template variable like this
then it throws an error
I've tried to debug and it basically doesn't like the token "server" possibly since the previous token did not have a $ to it? Can you elaborate how we can have a dynamic data map plugged into the template variable for example the above one:
$account.1.server.1.address could possibly have
var data map[string][]map[string][]map[string]interface{}
The text was updated successfully, but these errors were encountered: