From feba660942faa38fad1bd3153ce2104865844c9a Mon Sep 17 00:00:00 2001 From: "marko.tikvic" Date: Tue, 12 Feb 2019 16:20:46 +0100 Subject: [PATCH] split line constant --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 4bdc22d..870a7b1 100644 --- a/main.go +++ b/main.go @@ -96,9 +96,10 @@ func (l *Logger) LogHTTPRequest(req *http.Request, userID string) string { return b.String() } +const splitLine = "==============================================================" + func (l *Logger) LogHTTPResponse(status int, duration time.Duration, size int) string { - splitLine := "==============================================================\n" - return fmt.Sprintf("Response:\n%d %v %dB\n%s", status, duration, size, splitLine) + return fmt.Sprintf("Response:\n%d %v %dB\n%s\n", status, duration, size, splitLine) } func (l *Logger) CombineHTTPLogs(in string, out string) { -- 1.8.1.2