gogmagog/routes/errors.go
Deepak 2bda056ca7
All checks were successful
gitea-deepak/gogmagog/pipeline/head This commit looks good
Adds route to retrieve all plans and tests thereof, and json tags for model
2020-12-31 11:20:00 -06:00

13 lines
227 B
Go

package routes
import (
"log"
"net/http"
)
func serverError(w http.ResponseWriter, err error) {
code := http.StatusInternalServerError
log.Printf("received error: {%v}", err)
http.Error(w, http.StatusText(code), code)
}