(app *App)
| 875 | } |
| 876 | |
| 877 | func 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. |
| 893 | func CreateUser(apper Apper, username, password string, isAdmin bool) error { |
no test coverage detected