mirror of
https://github.com/prometheus/prometheus.git
synced 2025-09-21 13:51:00 +02:00
Go will not allocate when reading from a map with a key cast from []byte to string. Also remove some yoloString calls in package `textparse` - call a more suitable library function. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Making changes to textparse lexers
In the rare case that you need to update the textparse lexers, edit promlex.l or openmetricslex.l and then run the following command:
golex -o=promlex.l.go promlex.l
Note that you need golex installed:
go get -u modernc.org/golex