kavea/src/common.go

23 lines
338 B
Go

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
}