Skip to content

Commit 0b6432d

Browse files
committed
fix: linter errors
1 parent b7193b4 commit 0b6432d

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

pkg/subscraping/sources/censys/censys.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ func (s *Source) Run(ctx context.Context, domain string, session *subscraping.Se
111111
default:
112112
}
113113

114-
// Build request body
115114
reqBody := searchRequest{
116115
Query: queryPrefix + domain,
117116
Fields: []string{"cert.names"},
@@ -128,7 +127,6 @@ func (s *Source) Run(ctx context.Context, domain string, session *subscraping.Se
128127
return
129128
}
130129

131-
// Build headers with Bearer token auth
132130
headers := map[string]string{
133131
"Content-Type": contentTypeJSON,
134132
"Authorization": authHeaderPrefix + randomApiKey.pat,
@@ -138,7 +136,6 @@ func (s *Source) Run(ctx context.Context, domain string, session *subscraping.Se
138136
headers[orgIDHeader] = randomApiKey.orgID
139137
}
140138

141-
// Make POST request
142139
resp, err := session.HTTPRequest(
143140
ctx,
144141
http.MethodPost,
@@ -158,7 +155,7 @@ func (s *Source) Run(ctx context.Context, domain string, session *subscraping.Se
158155

159156
var censysResponse response
160157
err = jsoniter.NewDecoder(resp.Body).Decode(&censysResponse)
161-
resp.Body.Close()
158+
_ = resp.Body.Close()
162159
if err != nil {
163160
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}
164161
s.errors++

0 commit comments

Comments
 (0)