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

Function CreateConfig

app.go:637–646  ·  view source on GitHub ↗

CreateConfig creates a default configuration and saves it to the app's cfgFile.

(app *App)

Source from the content-addressed store, hash-verified

635
636// CreateConfig creates a default configuration and saves it to the app's cfgFile.
637func CreateConfig(app *App) error {
638 log.Info("Creating configuration...")
639 c := config.New()
640 log.Info("Saving configuration %s...", app.cfgFile)
641 err := config.Save(c, app.cfgFile)
642 if err != nil {
643 return fmt.Errorf("Unable to save configuration: %v", err)
644 }
645 return nil
646}
647
648// DoConfig runs the interactive configuration process.
649func DoConfig(app *App, configSections string) {

Callers 2

genConfigActionFunction · 0.92
legacyActionsFunction · 0.92

Calls 2

NewFunction · 0.92
SaveFunction · 0.92

Tested by

no test coverage detected