MCPcopy
hub / github.com/writefreely/writefreely / shutdown

Function shutdown

app.go:877–890  ·  view source on GitHub ↗
(app *App)

Source from the content-addressed store, hash-verified

875}
876
877func shutdown(app *App) {
878 log.Info("Closing database connection...")
879 app.db.Close()
880 if strings.HasPrefix(app.cfg.Server.Bind, "/") {
881 // Clean up socket
882 log.Info("Removing socket file...")
883 err := os.Remove(app.cfg.Server.Bind)
884 if err != nil {
885 log.Error("Unable to remove socket: %s", err)
886 os.Exit(1)
887 }
888 log.Info("Success.")
889 }
890}
891
892// CreateUser creates a new admin or normal user from the given credentials.
893func CreateUser(apper Apper, username, password string, isAdmin bool) error {

Callers 7

ServeFunction · 0.85
DoConfigFunction · 0.85
CreateSchemaFunction · 0.85
MigrateFunction · 0.85
ResetPasswordFunction · 0.85
DoDeleteAccountFunction · 0.85
CreateUserFunction · 0.85

Calls 1

CloseMethod · 0.80

Tested by

no test coverage detected