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

Method LoadConfig

app.go:145–155  ·  view source on GitHub ↗

LoadConfig loads and parses a config file.

()

Source from the content-addressed store, hash-verified

143
144// LoadConfig loads and parses a config file.
145func (app *App) LoadConfig() error {
146 log.Info("Loading %s configuration...", app.cfgFile)
147 cfg, err := config.Load(app.cfgFile)
148 if err != nil {
149 log.Error("Unable to load configuration: %v", err)
150 os.Exit(1)
151 return err
152 }
153 app.cfg = cfg
154 return nil
155}
156
157// SaveConfig saves the given Config to disk -- namely, to the App's cfgFile.
158func (app *App) SaveConfig(c *config.Config) error {

Callers 1

Calls 1

LoadFunction · 0.92

Tested by 1