mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-05 13:47:10 +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> |
||
---|---|---|
.. | ||
testdata | ||
benchmark_test.go | ||
interface_test.go | ||
interface.go | ||
nhcbparse_test.go | ||
nhcbparse.go | ||
openmetricslex.l | ||
openmetricslex.l.go | ||
openmetricsparse_test.go | ||
openmetricsparse.go | ||
promlex.l | ||
promlex.l.go | ||
promparse_test.go | ||
promparse.go | ||
protobufparse_test.go | ||
protobufparse.go | ||
README.md |
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