From c439f3aaf8c6e06142739285b485706f939e1650 Mon Sep 17 00:00:00 2001 From: Carlos Ortiz Date: Thu, 13 Jun 2024 22:40:47 -0600 Subject: [PATCH] Fix Linting --- pkg/request/parser.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/request/parser.go b/pkg/request/parser.go index bcabbf1..709c1ef 100644 --- a/pkg/request/parser.go +++ b/pkg/request/parser.go @@ -53,16 +53,16 @@ func ParseMonFile(file string) *Request { func parseRequestHeader(line string, r *Request) { parts := strings.Split(line, ": ") - if len(parts) != 2 { + if len(parts) == 2 { + r.Headers[parts[0]] = parts[1] } - r.Headers[parts[0]] = parts[1] } func parseRequestLine(requestLine string, r *Request) { log.Default().Println("Parsing request line") parts := strings.Split(requestLine, " ") - if len(parts) != 3 { + if len(parts) == 3 { + r.Method = parts[0] + r.URL = parts[1] } - r.Method = parts[0] - r.URL = parts[1] }