From 14703575578221ad40547147618354503e3005ae Mon Sep 17 00:00:00 2001 From: Clawd Date: Sun, 15 Feb 2026 18:55:50 -0800 Subject: fix: resolve build errors with v1 code - Rename validateName to validateNameV2 to avoid conflict - Fix host status to print JSON directly (remove unused resp) Builds successfully now --- cmd/ship/host_v2.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'cmd/ship/host_v2.go') diff --git a/cmd/ship/host_v2.go b/cmd/ship/host_v2.go index 0d70f5d..dec8b59 100644 --- a/cmd/ship/host_v2.go +++ b/cmd/ship/host_v2.go @@ -272,16 +272,13 @@ var hostStatusV2Cmd = &cobra.Command{ caddyStatus, _ := client.RunSudo("systemctl is-active caddy") dockerStatus, _ := client.RunSudo("systemctl is-active docker") - resp := map[string]interface{}{ - "status": "ok", - "host": hostName, - "domain": hostConfig.BaseDomain, - "caddy": strings.TrimSpace(caddyStatus) == "active", - "docker": strings.TrimSpace(dockerStatus) == "active", - } - - // Use JSON encoder directly since this is a custom response - output.Print(&output.ListResponse{Status: "ok"}) // Placeholder + // Print as JSON directly (custom response type) + fmt.Printf(`{"status":"ok","host":%q,"domain":%q,"caddy":%t,"docker":%t}`+"\n", + hostName, + hostConfig.BaseDomain, + strings.TrimSpace(caddyStatus) == "active", + strings.TrimSpace(dockerStatus) == "active", + ) return nil }, } -- cgit v1.2.3