http.status

用法

package main

import (
    "net/http"
)


func main() {
    w.WriteHeader(http.StatusOK)
    http.Error(w, err.Error(), http.StatusBadRequest)
    http.ErrHandlerTimeout
}