~yerinalexey/gtranslate

ref: 54be24d1a5d0e714ac28dbe42cbfcf33217fdd85 gtranslate/utils.go -rw-r--r-- 162 bytes
54be24d1Alexey Yerin api: use fmt.Fprint/Fprintln 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)
	fmt.Fprintln(w, err)
}