Merge pull request #828 from prometheus/fabxc/cfgout

config: show original input on String()
pull/833/head
Fabian Reinartz 2015-06-23 21:57:43 +02:00
commit f149389d29
1 changed files with 2 additions and 3 deletions

View File

@ -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
}