fix(lint): fix errcheck and misspell in orphans.go

- Check fmt.Scanln return values (errcheck)
- Fix "Cancelled" → "Canceled" spelling (misspell)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gus
2026-01-13 13:32:06 -08:00
committed by Steve Yegge
parent 66805079de
commit ff6c02b15d

View File

@@ -399,9 +399,9 @@ func runOrphansKill(cmd *cobra.Command, args []string) error {
fmt.Printf("%s\n", style.Warning.Render("WARNING: This operation is irreversible!"))
fmt.Printf("Remove %d orphaned commit(s)? [y/N] ", len(filtered))
var response string
fmt.Scanln(&response)
_, _ = fmt.Scanln(&response)
if strings.ToLower(strings.TrimSpace(response)) != "y" {
fmt.Printf("%s Cancelled\n", style.Dim.Render(""))
fmt.Printf("%s Canceled\n", style.Dim.Render(""))
return nil
}
}
@@ -568,7 +568,7 @@ func runOrphansKillProcesses(cmd *cobra.Command, args []string) error {
if !orphansProcsForce {
fmt.Printf("Kill these %d process(es)? [y/N] ", len(orphans))
var response string
fmt.Scanln(&response)
_, _ = fmt.Scanln(&response)
response = strings.ToLower(strings.TrimSpace(response))
if response != "y" && response != "yes" {
fmt.Println("Aborted")