I have the following data:
{{ printf "%T" $resultprice }}
{{ printf $resultprice }}
The output is:
string
402.30
I feed this data into the expression:
{{ $resultpriceFloat := cast.ToFloat $resultprice }}
It works for 1-2 minutes and shows the output:
float64
402.30
But then it crashes and throws an error:
execute of template failed at <float $resultprice>: error calling float: unable to cast "%!!(MISSING)f(int=00)" of type string to float64
What am I doing wrong?
Thanks!