func R500(w http.ResponseWriter, data interface{}) {
	SendError(w, data, http.StatusInternalServerError)
}
R500 - Internal server error
package webgo
import (
	"encoding/json"
	"fmt"
	"html/template"
	"net/http"
)
type ErrorData struct {
	ErrCode        int
	ErrDescription string
}
type dOutput struct {
	Data   interface{} `json:"data"`
	Status int         `json:"status"`
}
type errOutput struct {
	Errors interface{} `json:"errors"`
	Status int         `json:"status"`
}
const (
	HeaderContentType = "Content-Type"
	JSONContentType = "application/json"
	HTMLContentType = "text/html; charset=UTF-8"
	ErrInternalServer = "Internal server error"
)
func SendHeader(w http.ResponseWriter, rCode int) {
	w.WriteHeader(rCode)
}
func crwAsserter(w http.ResponseWriter, rCode int) http.ResponseWriter {
	if crw, ok := w.(*customResponseWriter); ok {
		crw.statusCode = rCode
		return crw
	}
	return newCRW(w, rCode)
}
func Send(w http.ResponseWriter, contentType string, data interface{}, rCode int) {
	w = crwAsserter(w, rCode)
	w.Header().Set(HeaderContentType, contentType)
	_, err := fmt.Fprint(w, data)
	if err != nil {
		w.WriteHeader(http.StatusInternalServerError)
		w.Write([]byte(ErrInternalServer))
		LOGHANDLER.Error(err)
	}
}
func SendResponse(w http.ResponseWriter, data interface{}, rCode int) {
	w = crwAsserter(w, rCode)
	w.Header().Add(HeaderContentType, JSONContentType)
	err := json.NewEncoder(w).Encode(dOutput{Data: data, Status: rCode})
	if err != nil {
		R500(w, ErrInternalServer)
		LOGHANDLER.Error(err)
	}
}
func SendError(w http.ResponseWriter, data interface{}, rCode int) {
	w = crwAsserter(w, rCode)
	w.Header().Add(HeaderContentType, JSONContentType)
	err := json.NewEncoder(w).Encode(errOutput{data, rCode})
	if err != nil {
		R500(w, ErrInternalServer)
		LOGHANDLER.Error(err)
	}
}
func Render(w http.ResponseWriter, data interface{}, rCode int, tpl *template.Template) {
	w = crwAsserter(w, rCode)
	w.Header().Set(HeaderContentType, HTMLContentType)
	err := tpl.Execute(w, data)
	if err != nil {
		Send(w, "text/plain", ErrInternalServer, http.StatusInternalServerError)
		LOGHANDLER.Error(err.Error())
	}
}
func R200(w http.ResponseWriter, data interface{}) {
	SendResponse(w, data, http.StatusOK)
}
func R201(w http.ResponseWriter, data interface{}) {
	SendResponse(w, data, http.StatusCreated)
}
func R204(w http.ResponseWriter) {
	SendHeader(w, http.StatusNoContent)
}
func R302(w http.ResponseWriter, data interface{}) {
	SendResponse(w, data, http.StatusFound)
}
func R400(w http.ResponseWriter, data interface{}) {
	SendError(w, data, http.StatusBadRequest)
}
func R403(w http.ResponseWriter, data interface{}) {
	SendError(w, data, http.StatusForbidden)
}
func R404(w http.ResponseWriter, data interface{}) {
	SendError(w, data, http.StatusNotFound)
}
func R406(w http.ResponseWriter, data interface{}) {
	SendError(w, data, http.StatusNotAcceptable)
}
func R451(w http.ResponseWriter, data interface{}) {
	SendError(w, data, http.StatusUnavailableForLegalReasons)
}