~yerinalexey/gtranslate

ref: 3f6bdee18d632b76fc3dd50d70023cb26323f3d8 gtranslate/utils.go -rw-r--r-- 176 bytes
3f6bdee1Alexey Yerin web, api: terminate request on parse error 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
package main

import (
	"fmt"
	"net/http"
)

func writeError(w http.ResponseWriter, status int, err interface{}) {
	w.WriteHeader(status)
	w.Write([]byte(fmt.Sprintln(err)))
}