go-graphite / carbonapi

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

Add support for Graphite web toLowerCase function #699

Closed carrieedwards closed 2 years ago

carrieedwards commented 2 years ago

This PR adds support for Graphite web's toLowerCase function. This function is defined as:

toLowerCase(seriesList, *pos)
Takes one metric or a wildcard seriesList and lowers the case of each letter.

Optionally, a letter position to lower case can be specified, in which case only the letter at the specified position gets lower-cased. The position parameter may be given multiple times. The position parameter may be negative to define a position relative to the end of the metric name.

This PR also includes tests to verify functionality according to the definition and Graphite web's implementation