Skip to content

Commit

Permalink
go lint
Browse files Browse the repository at this point in the history
  • Loading branch information
phillip-stephens committed Jan 27, 2025
1 parent b32841a commit 5295815
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/http/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ func readResponse(tc *TeeConn, req *Request) (*Response, error) {
// To revert: delete next block and uncomment original tp.ReadMIMEHeader call

var headerReaderTP *textproto.Reader
resp.HeaderList, headerReaderTP, err = extractHeaderList(tp);
if (err != nil){
resp.HeaderList, headerReaderTP, err = extractHeaderList(tp)
if err != nil {
return resp, err
}
mimeHeader, err := headerReaderTP.ReadMIMEHeader()
Expand Down Expand Up @@ -246,7 +246,7 @@ func readResponse(tc *TeeConn, req *Request) (*Response, error) {
return resp, nil
}

func extractHeaderList(tp *textproto.Reader) ([]HeaderField, *textproto.Reader, error){
func extractHeaderList(tp *textproto.Reader) ([]HeaderField, *textproto.Reader, error) {
// Store each header name in a list in order

// Initialize headerList to add each header value-name pair (capacity is an estimate based of new lines)
Expand All @@ -273,7 +273,7 @@ func extractHeaderList(tp *textproto.Reader) ([]HeaderField, *textproto.Reader,

// If there was an error reading the next line, we throw an error
if err != nil {
return headerList, headerReaderTP, err
return headerList, headerReaderTP, err
}

// Find the colon
Expand Down

0 comments on commit 5295815

Please sign in to comment.