1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 11:50:55 +00:00

added compatibility for go1.4

This commit is contained in:
Faissal Elamraoui 2016-06-17 17:39:32 +02:00
parent 2bd743fcff
commit 448be6e58c

View File

@ -108,19 +108,19 @@ func ColorByStatus(code int) string {
func ColorByMethod(method string) string { func ColorByMethod(method string) string {
switch method { switch method {
case http.MethodGet: case "GET":
return blue return blue
case http.MethodPost: case "POST":
return cyan return cyan
case http.MethodPut: case "PUT":
return yellow return yellow
case http.MethodDelete: case "DELETE":
return red return red
case http.MethodPatch: case "PATCH":
return green return green
case http.MethodHead: case "HEAD":
return magenta return magenta
case http.MethodOptions: case "OPTIONS":
return white return white
default: default:
return reset return reset