fix: code review fixes from gt-2tp and gt-y0t

- Replace custom contains() with strings.Contains in init.go
- Make session stop --force flag actually work
- Update session.Manager.Stop() to accept force parameter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-16 13:56:32 -08:00
parent eef28f3ee5
commit 29e4436891
5 changed files with 32 additions and 35 deletions

View File

@@ -225,8 +225,12 @@ func runSessionStop(cmd *cobra.Command, args []string) error {
return err
}
fmt.Printf("Stopping session for %s/%s...\n", rigName, polecatName)
if err := mgr.Stop(polecatName); err != nil {
if sessionForce {
fmt.Printf("Force stopping session for %s/%s...\n", rigName, polecatName)
} else {
fmt.Printf("Stopping session for %s/%s...\n", rigName, polecatName)
}
if err := mgr.Stop(polecatName, sessionForce); err != nil {
return fmt.Errorf("stopping session: %w", err)
}