Skip to content

Commit 37cd1d1

Browse files
JordanCoinclaude
andcommitted
Fix staticcheck S1017: use unconditional TrimPrefix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 013a98c commit 37cd1d1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

scanner/astgrep.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,7 @@ func extractImportPath(text string) string {
317317
text = strings.TrimSuffix(text, ";")
318318
text = strings.TrimSpace(text)
319319

320-
if strings.HasPrefix(text, "static ") {
321-
text = strings.TrimPrefix(text, "static ")
322-
}
320+
text = strings.TrimPrefix(text, "static ")
323321

324322
if idx := strings.Index(text, "="); idx >= 0 {
325323
text = text[idx+1:]

0 commit comments

Comments
 (0)