mirror of
https://github.com/restic/rest-server.git
synced 2025-12-06 17:15:45 -08:00
Slightly improve error handling
Pass errors from Cobra runRoot() to main().
This commit is contained in:
2
mux.go
2
mux.go
@@ -34,7 +34,7 @@ func debugHandler(next http.Handler) http.Handler {
|
||||
func logHandler(next http.Handler) http.Handler {
|
||||
accessLog, err := os.OpenFile(Config.Log, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
log.Fatalf("error: %v", err)
|
||||
}
|
||||
|
||||
return handlers.CombinedLoggingHandler(accessLog, next)
|
||||
|
||||
Reference in New Issue
Block a user