Skip to content

Commit

Permalink
Fix Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cortiz committed Jun 14, 2024
1 parent e0261e5 commit c439f3a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/request/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}

0 comments on commit c439f3a

Please sign in to comment.