Commit 448be6e5 authored by Faissal Elamraoui's avatar Faissal Elamraoui

added compatibility for go1.4

parent 2bd743fc
...@@ -108,19 +108,19 @@ func ColorByStatus(code int) string { ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment