go-graphite / carbonapi

Implementation of graphite API (graphite-web) in golang
Other
308 stars 140 forks source link

Allow quoted numeric arguments for asPercent and keepLastValue #706

Closed carrieedwards closed 1 year ago

carrieedwards commented 1 year ago

The asPercent function and the keepLastValue function were not allowing singly quoted input for their total and limit parameters respectively. Users will sometimes pass in numeric values within single quotes, and doing so was resulting in errors. Since we previously added ability to parse quoted floats and ints (see https://github.com/go-graphite/carbonapi/pull/694), it should be extended to asPercent and keepLastValue as well.