Commit Graph

6 Commits

Author SHA1 Message Date
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
Fabian Reinartz
398bbf906b Switch to common/route package 2015-09-24 17:08:47 +02:00
Fabian Reinartz
306e8468a0 Switch from client_golang/model to common/model 2015-08-21 13:33:38 +02:00
Fabian Reinartz
62b4e89b39 Restore legacy API scalar format 2015-07-16 20:19:18 +02:00
Fabian Reinartz
85d7c7640a web: remove flags, refactor handlers 2015-06-15 19:01:06 +02:00
Fabian Reinartz
5b713911e3 web/api: enable running API legacy and v1 in parallel 2015-06-08 19:11:48 +02:00