fix(daemon): silence deprecation warnings in --json mode

Follow-up fixes to PR #1006:
- Silence deprecation warnings when --json flag is set (agent ergonomics)
- Remove unused outputStatusJSON() function
- Remove unused encoding/json import from daemon_status.go

Agents parsing JSON output dont need deprecation warnings cluttering stderr.
The subcommand syntax (bd daemon start) remains the documented path forward.

See bd-ntl3b for deduplication work, bd-kpa7c for type consolidation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
emma
2026-01-10 16:31:16 -08:00
committed by Steve Yegge
parent d8d4a7ed2d
commit 1039a69186
2 changed files with 17 additions and 22 deletions

View File

@@ -1,7 +1,6 @@
package main
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
@@ -443,9 +442,3 @@ func showAllDaemonsStatus(cmd *cobra.Command) {
os.Exit(1)
}
}
// outputStatusJSON outputs the status as JSON (helper to avoid duplicating json.Marshal)
func outputStatusJSON(v interface{}) {
data, _ := json.MarshalIndent(v, "", " ")
fmt.Println(string(data))
}