-
Notifications
You must be signed in to change notification settings - Fork 781
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
literal integer are interpreted as int instead of int64. #1143
Comments
An easy workaround is to do a |
I update the bug report with the same example using a simple variable this time... same results. |
Thanks for the report @hashicorp/consul-eco I'm not sure why the original author changed loop to take int64 instead of int (which it did before that). There is no explanation nor linked issue and it was done 6 months after loop was added (back in 2015). Anyone have a clue? |
`loop` when passed a scrach or $variable that contained an int as the function was typed to only take int64. This changes it more like the other functions that takes a interface{} and type switches/converts it using reflect. Made it handle integer strings while I was at it. Fixes #1143
Fix coming with PR #1255 |
`loop` when passed a scrach or $variable that contained an int as the function was typed to only take int64. This changes it more like the other functions that takes a interface{} and type switches/converts it using reflect. Made it handle integer strings while I was at it. Fixes #1143
Consul Template version
consul-template v0.19.5 (57b6c71)
Configuration
or even:
Command
Debug output
https://gist.github.com/ninoles/a8c20e7ce709e15e969350d205bd5c57
Expected behavior
What should have happened?
The template should have run the loop and print
-> 1 -> 2
Actual behavior
.\template.txt: execute: template: :2:33: executing "" at <"t">: wrong type for value; expected int64; got int
Steps to reproduce
References
The text was updated successfully, but these errors were encountered: