kavea/src/common.go

23 lines
338 B
Go
Raw Normal View History

2021-09-19 18:40:50 -04:00
package main
import (
"log"
"net/http"
)
func checkError(err error) bool {
if err != nil {
log.Print("ERROR! " + err.Error())
return false
}
return true
}
func checkWebError(w http.ResponseWriter, err error) bool {
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return false
}
return true
}