MCPcopy Index your code
hub / github.com/writefreely/writefreely / Save

Function Save

config/config.go:304–315  ·  view source on GitHub ↗

Save writes the given Config to the given file.

(uc *Config, fname string)

Source from the content-addressed store, hash-verified

302
303// Save writes the given Config to the given file.
304func 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}

Callers 3

SaveConfigMethod · 0.92
CreateConfigFunction · 0.92
ConfigureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected