12 lines
176 B
Go
12 lines
176 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func writeError(w http.ResponseWriter, status int, err interface{}) {
|
||
|
w.WriteHeader(status)
|
||
|
w.Write([]byte(fmt.Sprintln(err)))
|
||
|
}
|