From 448be6e58cb746015d02a3f1ae0cb882e1f112da Mon Sep 17 00:00:00 2001 From: Faissal Elamraoui Date: Fri, 17 Jun 2016 17:39:32 +0200 Subject: [PATCH] added compatibility for go1.4 --- logs/logger.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/logs/logger.go b/logs/logger.go index aff7e992..db6d2ce9 100644 --- a/logs/logger.go +++ b/logs/logger.go @@ -108,19 +108,19 @@ func ColorByStatus(code int) string { func ColorByMethod(method string) string { switch method { - case http.MethodGet: + case "GET": return blue - case http.MethodPost: + case "POST": return cyan - case http.MethodPut: + case "PUT": return yellow - case http.MethodDelete: + case "DELETE": return red - case http.MethodPatch: + case "PATCH": return green - case http.MethodHead: + case "HEAD": return magenta - case http.MethodOptions: + case "OPTIONS": return white default: return reset