prometheus/util
Julius Volz 46c5260761 Support escape sequences in strings and add raw strings.
This adapts some functionality from the Go standard library for string
literal lexing and unquoting/unescaping.

The following string types are now supported:

Double- or single-quoted strings:

  These support all escape sequences that Go supports in double-quoted
  string literals. The difference is that Prometheus also has
  single-quoted strings (instead of single-quoted runes in Go). Raw
  newlines are not allowed.

Backtick-quoted raw strings:

  Strings quoted in backticks are treated as raw strings just like in Go
  and may contain raw newlines and other special characters directly.

Fixes https://github.com/prometheus/prometheus/issues/1122
Fixes https://github.com/prometheus/prometheus/issues/1121
2015-10-08 19:17:21 +02:00
..
cli Fix some dead code, missing error checks, shadowings. 2015-09-14 12:21:34 +02:00
flock Fix some dead code, missing error checks, shadowings. 2015-09-14 12:21:34 +02:00
httputil Fix some dead code, missing error checks, shadowings. 2015-09-14 12:21:34 +02:00
stats Move pkg/ to util/ 2015-06-01 21:12:32 +02:00
strutil Support escape sequences in strings and add raw strings. 2015-10-08 19:17:21 +02:00
testutil Fix most golint warnings. 2015-08-26 12:44:46 +02:00