Skip to content

Commit 174157e

Browse files
committed
style: gofumpt formatting
1 parent 83ca240 commit 174157e

5 files changed

Lines changed: 25 additions & 25 deletions

File tree

api_security_ext_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,10 @@ func TestAPISecurityChecker_Timeout(t *testing.T) {
299299
func TestCheckJWTWeakness_SensitiveDataCreditCard(t *testing.T) {
300300
header := base64.RawURLEncoding.EncodeToString([]byte(`{"alg":"RS256"}`))
301301
payloadData := map[string]interface{}{
302-
"sub": "1234",
303-
"exp": float64(9999999999),
304-
"iss": "auth",
305-
"cc_number": "4111111111111111",
302+
"sub": "1234",
303+
"exp": float64(9999999999),
304+
"iss": "auth",
305+
"cc_number": "4111111111111111",
306306
}
307307
payloadBytes, _ := json.Marshal(payloadData)
308308
payload := base64.RawURLEncoding.EncodeToString(payloadBytes)

internal/check/custom_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func TestRegistry_FilterWithEmptyString(t *testing.T) {
296296
// --- captureChecker is a test helper that captures the pages slice ---
297297

298298
type captureChecker struct {
299-
name string
299+
name string
300300
runFn func(ctx context.Context, pages []*crawler.Page) []Finding
301301
}
302302

internal/crawler/crawler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ func TestRateLimiter_ThrottlesHighRate(t *testing.T) {
292292
}
293293

294294
func TestRateLimiter_ContextCancellation(t *testing.T) {
295-
rl := newRateLimiter(1) // 1 req/sec = very slow
295+
rl := newRateLimiter(1) // 1 req/sec = very slow
296296
rl.Wait(context.Background()) // first request goes through immediately
297297

298298
ctx, cancel := context.WithCancel(context.Background())

sarif.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type sarifRelationship struct {
4242
}
4343

4444
type sarifDescriptorReference struct {
45-
ID string `json:"id"`
45+
ID string `json:"id"`
4646
ToolComponent *sarifComponentReference `json:"toolComponent,omitempty"`
4747
}
4848

@@ -51,10 +51,10 @@ type sarifComponentReference struct {
5151
}
5252

5353
type sarifResult struct {
54-
RuleID string `json:"ruleId"`
55-
Level string `json:"level"`
56-
Message sarifMessage `json:"message"`
57-
Locations []sarifLocation `json:"locations"`
54+
RuleID string `json:"ruleId"`
55+
Level string `json:"level"`
56+
Message sarifMessage `json:"message"`
57+
Locations []sarifLocation `json:"locations"`
5858
}
5959

6060
type sarifMessage struct {
@@ -98,8 +98,8 @@ func GenerateSARIF(findings []Finding, version string) string {
9898
}
9999
ruleSet[checkID] = true
100100
rule := sarifRule{
101-
ID: checkID,
102-
Name: checkID,
101+
ID: checkID,
102+
Name: checkID,
103103
ShortDescription: sarifMessage{Text: fmt.Sprintf("%s check", checkID)},
104104
}
105105
rules = append(rules, rule)

sbom.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ import (
1212

1313
// SBOMDocument represents a CycloneDX 1.5 Software Bill of Materials.
1414
type SBOMDocument struct {
15-
BOMFormat string `json:"bomFormat"`
16-
SpecVersion string `json:"specVersion"`
17-
SerialNumber string `json:"serialNumber,omitempty"`
18-
Version int `json:"version"`
19-
Metadata SBOMMetadata `json:"metadata"`
15+
BOMFormat string `json:"bomFormat"`
16+
SpecVersion string `json:"specVersion"`
17+
SerialNumber string `json:"serialNumber,omitempty"`
18+
Version int `json:"version"`
19+
Metadata SBOMMetadata `json:"metadata"`
2020
Components []SBOMComponent `json:"components"`
2121
}
2222

2323
// SBOMMetadata contains metadata about the SBOM.
2424
type SBOMMetadata struct {
25-
Timestamp string `json:"timestamp"`
26-
Tools []SBOMTool `json:"tools,omitempty"`
25+
Timestamp string `json:"timestamp"`
26+
Tools []SBOMTool `json:"tools,omitempty"`
2727
Component *SBOMComponent `json:"component,omitempty"`
2828
}
2929

@@ -36,11 +36,11 @@ type SBOMTool struct {
3636

3737
// SBOMComponent represents a software component/dependency.
3838
type SBOMComponent struct {
39-
Type string `json:"type"`
40-
Name string `json:"name"`
41-
Version string `json:"version"`
42-
PURL string `json:"purl,omitempty"`
43-
Scope string `json:"scope,omitempty"`
39+
Type string `json:"type"`
40+
Name string `json:"name"`
41+
Version string `json:"version"`
42+
PURL string `json:"purl,omitempty"`
43+
Scope string `json:"scope,omitempty"`
4444
}
4545

4646
// GenerateSBOM produces a CycloneDX 1.5 SBOM from project dependency files.

0 commit comments

Comments
 (0)