Skip to content

Commit ba0e03b

Browse files
committed
fmt
1 parent 3d9a80f commit ba0e03b

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

certgraph.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -419,29 +419,29 @@ func visit(domainNode *graph.DomainNode) {
419419

420420
// fingerprints for the domain queried
421421
fingerprints := fingerprintMap[domainNode.Domain]
422-
422+
423423
// Parallelize certificate processing using worker pool
424424
type certWork struct {
425-
fp fingerprint.Fingerprint
425+
fp fingerprint.Fingerprint
426426
result *graph.CertNode
427-
err error
427+
err error
428428
}
429-
429+
430430
certChan := make(chan fingerprint.Fingerprint, len(fingerprints))
431431
resultChan := make(chan certWork, len(fingerprints))
432-
432+
433433
// Start worker goroutines
434434
numWorkers := min(config.parallel, uint(len(fingerprints)))
435435
if numWorkers == 0 {
436436
numWorkers = 1
437437
}
438-
438+
439439
for i := uint(0); i < numWorkers; i++ {
440440
go func() {
441441
for fp := range certChan {
442442
var work certWork
443443
work.fp = fp
444-
444+
445445
// Check if we've already attempted to process this certificate
446446
processedCertsMutex.Lock()
447447
if processedCerts[fp] {
@@ -466,7 +466,7 @@ func visit(domainNode *graph.DomainNode) {
466466
}
467467
}()
468468
}
469-
469+
470470
// Send work to workers
471471
workCount := 0
472472
for _, fp := range fingerprints {
@@ -478,7 +478,7 @@ func visit(domainNode *graph.DomainNode) {
478478
workCount++
479479
}
480480
close(certChan)
481-
481+
482482
// Collect results
483483
for i := 0; i < workCount; i++ {
484484
work := <-resultChan
@@ -488,12 +488,12 @@ func visit(domainNode *graph.DomainNode) {
488488
}
489489
continue
490490
}
491-
491+
492492
if work.result != nil {
493493
certGraph.AddCert(work.result)
494494
}
495495
}
496-
496+
497497
// Add relationships after all certificates are processed
498498
for _, fp := range fingerprints {
499499
certNode, exists := certGraph.GetCert(fp)

driver/http/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func (d *httpDriver) QueryDomain(ctx context.Context, host string) (driver.Resul
129129
if err != nil {
130130
return nil, fmt.Errorf("failed to create request: %w", err)
131131
}
132-
132+
133133
resp, err := results.client.Do(req)
134134
fullStatus := status.CheckNetErr(err)
135135
if fullStatus != status.GOOD {

driver/multi/multi_driver.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ func newResult(host string) *multiResult {
7878
// multiResult aggregates results from multiple drivers for a single domain query.
7979
// It provides thread-safe access to merged certificate fingerprints and related data.
8080
type multiResult struct {
81-
host string // The queried domain
82-
results []driver.Result // Results from individual drivers
83-
resultLock sync.Mutex // Protects results and fingerprints maps
84-
fingerprints driver.FingerprintMap // Merged fingerprints from all drivers
85-
seenFPs map[fingerprint.Fingerprint]bool // Tracks fingerprints to prevent duplicates
86-
driverStatuses []status.Map // Individual driver status reports
81+
host string // The queried domain
82+
results []driver.Result // Results from individual drivers
83+
resultLock sync.Mutex // Protects results and fingerprints maps
84+
fingerprints driver.FingerprintMap // Merged fingerprints from all drivers
85+
seenFPs map[fingerprint.Fingerprint]bool // Tracks fingerprints to prevent duplicates
86+
driverStatuses []status.Map // Individual driver status reports
8787
}
8888

8989
// add merges a driver result into this multiResult instance.
@@ -136,10 +136,10 @@ func (c *multiResult) GetFingerprints() (driver.FingerprintMap, error) {
136136
func (c *multiResult) GetStatus() status.Map {
137137
c.resultLock.Lock()
138138
defer c.resultLock.Unlock()
139-
139+
140140
// Create main multi-driver status
141141
multiStatus := status.NewMap(c.host, status.New(status.MULTI))
142-
142+
143143
// Add individual driver statuses with prefixed keys for identification
144144
for i, driverStatus := range c.driverStatuses {
145145
for domain, stat := range driverStatus {
@@ -148,7 +148,7 @@ func (c *multiResult) GetStatus() status.Map {
148148
multiStatus[key] = stat
149149
}
150150
}
151-
151+
152152
return multiStatus
153153
}
154154

0 commit comments

Comments
 (0)