Skip to content

Building 70 Projects ranging from beginner to advanced so anyone can β€” learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company πŸ‘‡

truncate long vuln summaries in verbose mode to prevent ugly wrapping

CarterPerez-devfb109314f0c3
diff --git a/PROJECTS/simple-vulnerability-scanner/internal/cli/output.go b/PROJECTS/simple-vulnerability-scanner/internal/cli/output.go
index 1e5e58d2..70e2c963 100644
--- a/PROJECTS/simple-vulnerability-scanner/internal/cli/output.go
+++ b/PROJECTS/simple-vulnerability-scanner/internal/cli/output.go
@@ -190,7 +190,7 @@ func printVulnsVerbose(
),
bold(id),
)
- fmt.Printf(" %s\n", v.Summary)
+ fmt.Printf(" %s\n", truncate(v.Summary, 72))
if v.FixedIn != "" {
fmt.Printf(
" %s %s\n",