github.com/cellofellow/gopkg@v0.0.0-20140722061823-eec0544a62ad/web/status.go (about)

     1  // Copyright 2013 <chaishushan{AT}gmail.com>. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package web
     6  
     7  import "net/http"
     8  
     9  var statusText = map[int]string{
    10  	http.StatusContinue:           "Continue",
    11  	http.StatusSwitchingProtocols: "Switching Protocols",
    12  
    13  	http.StatusOK:                   "OK",
    14  	http.StatusCreated:              "Created",
    15  	http.StatusAccepted:             "Accepted",
    16  	http.StatusNonAuthoritativeInfo: "Non-Authoritative Information",
    17  	http.StatusNoContent:            "No Content",
    18  	http.StatusResetContent:         "Reset Content",
    19  	http.StatusPartialContent:       "Partial Content",
    20  
    21  	http.StatusMultipleChoices:   "Multiple Choices",
    22  	http.StatusMovedPermanently:  "Moved Permanently",
    23  	http.StatusFound:             "Found",
    24  	http.StatusSeeOther:          "See Other",
    25  	http.StatusNotModified:       "Not Modified",
    26  	http.StatusUseProxy:          "Use Proxy",
    27  	http.StatusTemporaryRedirect: "Temporary Redirect",
    28  
    29  	http.StatusBadRequest:                   "Bad Request",
    30  	http.StatusUnauthorized:                 "Unauthorized",
    31  	http.StatusPaymentRequired:              "Payment Required",
    32  	http.StatusForbidden:                    "Forbidden",
    33  	http.StatusNotFound:                     "Not Found",
    34  	http.StatusMethodNotAllowed:             "Method Not Allowed",
    35  	http.StatusNotAcceptable:                "Not Acceptable",
    36  	http.StatusProxyAuthRequired:            "Proxy Authentication Required",
    37  	http.StatusRequestTimeout:               "Request Timeout",
    38  	http.StatusConflict:                     "Conflict",
    39  	http.StatusGone:                         "Gone",
    40  	http.StatusLengthRequired:               "Length Required",
    41  	http.StatusPreconditionFailed:           "Precondition Failed",
    42  	http.StatusRequestEntityTooLarge:        "Request Entity Too Large",
    43  	http.StatusRequestURITooLong:            "Request URI Too Long",
    44  	http.StatusUnsupportedMediaType:         "Unsupported Media Type",
    45  	http.StatusRequestedRangeNotSatisfiable: "Requested Range Not Satisfiable",
    46  	http.StatusExpectationFailed:            "Expectation Failed",
    47  
    48  	http.StatusInternalServerError:     "Internal Server Error",
    49  	http.StatusNotImplemented:          "Not Implemented",
    50  	http.StatusBadGateway:              "Bad Gateway",
    51  	http.StatusServiceUnavailable:      "Service Unavailable",
    52  	http.StatusGatewayTimeout:          "Gateway Timeout",
    53  	http.StatusHTTPVersionNotSupported: "HTTP Version Not Supported",
    54  }