Save writes the given Config to the given file.
(uc *Config, fname string)
| 302 | |
| 303 | // Save writes the given Config to the given file. |
| 304 | func Save(uc *Config, fname string) error { |
| 305 | cfg := ini.Empty() |
| 306 | err := ini.ReflectFrom(cfg, uc) |
| 307 | if err != nil { |
| 308 | return err |
| 309 | } |
| 310 | |
| 311 | if fname == "" { |
| 312 | fname = FileName |
| 313 | } |
| 314 | return cfg.SaveTo(fname) |
| 315 | } |
no outgoing calls
no test coverage detected