forked from mirrors/statsd_exporter
Add example for configuration without trailing newline.
Inspired by #102, illustrate and ensure that trailing newlines are not necessary.
This commit is contained in:
parent
d4d0b4a6a7
commit
e24888356f
1 changed files with 14 additions and 0 deletions
|
@ -189,6 +189,20 @@ mappings:
|
||||||
config: ``,
|
config: ``,
|
||||||
mappings: map[string]map[string]string{},
|
mappings: map[string]map[string]string{},
|
||||||
},
|
},
|
||||||
|
// Config without a trailing newline.
|
||||||
|
{
|
||||||
|
config: `mappings:
|
||||||
|
- match: test.*
|
||||||
|
labels:
|
||||||
|
name: "name"
|
||||||
|
label: "${1}_foo"`,
|
||||||
|
mappings: map[string]map[string]string{
|
||||||
|
"test.a": map[string]string{
|
||||||
|
"name": "name",
|
||||||
|
"label": "a_foo",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
// Config with good timer type.
|
// Config with good timer type.
|
||||||
{
|
{
|
||||||
config: `---
|
config: `---
|
||||||
|
|
Loading…
Reference in a new issue