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 New Issue