mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 13:44:05 -08:00
config: show original input on String()
This commit is contained in:
parent
e18bc94980
commit
7ec15956e4
|
@ -24,13 +24,12 @@ var (
|
|||
|
||||
// Load parses the YAML input s into a Config.
|
||||
func Load(s string) (*Config, error) {
|
||||
cfg := &Config{
|
||||
original: s,
|
||||
}
|
||||
cfg := &Config{}
|
||||
err := yaml.Unmarshal([]byte(s), cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cfg.original = s
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue