Cleanup before merging to main

This commit is contained in:
2026-06-10 10:55:59 -05:00
parent c52e505c18
commit 61934bb2f4
3 changed files with 13 additions and 14 deletions

21
main.go
View File

@@ -71,7 +71,7 @@ func main() {
switch subCommand {
case "daemon":
fmt.Printf("Initializing VS server manager background supervisor [Config: %s]...\n", absConfigPath)
fmt.Printf("Initializing VSSM Daemon [Config: %s]...\n", absConfigPath)
if err := StartDaemon(cfg, absConfigPath); err != nil {
log.Fatalf("Daemon runtime fatal error: %v", err)
}
@@ -149,7 +149,7 @@ func sendIPCRequest(cfg *AppConfig, method string, path string, body io.Reader)
fmt.Printf("Listen Addr: %s; Target URL: %s\n", listenAddress, targetUrl)
req, err := http.NewRequest(method, targetUrl, body)
if err != nil {
log.Fatalf("Failed to construct IPC frame: %v", err)
log.Fatalf("Failed to construct IPC request: %v", err)
}
if body != nil {
@@ -158,7 +158,7 @@ func sendIPCRequest(cfg *AppConfig, method string, path string, body io.Reader)
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatalf("IPC connection failed. Is the vs-manager daemon running? Error: %v", err)
log.Fatalf("IPC connection failed. Is the VSSM daemon running? Error: %v", err)
}
defer resp.Body.Close()
@@ -176,7 +176,7 @@ func fetchAndPrintStatus(cfg *AppConfig) {
targetUrl := fmt.Sprintf("http://%s/instances/list", listenAddress)
resp, err := http.Get(targetUrl)
if err != nil {
log.Fatalf("IPC connection failed. Is the vs-manager daemon running? Error: %v", err)
log.Fatalf("IPC connection failed. Is the VSSM daemon running? Error: %v", err)
}
defer resp.Body.Close()
@@ -191,7 +191,7 @@ func fetchAndPrintStatus(cfg *AppConfig) {
}
if len(instances) == 0 {
fmt.Println("No instances configured yet. Use 'create' to provision one.")
fmt.Println("No instances configured yet. Use 'create' to create one.")
return
}
@@ -210,10 +210,11 @@ func printUsage() {
fmt.Println("\nGlobal Options:")
fmt.Println(" --config <path> Explicitly target a non-default config structure file location")
fmt.Println("\nUsage Commands:")
fmt.Println(" vssm daemon Starts the background process supervisor")
fmt.Println(" vssm create <name> <version> Provisions baseline configuration and stores instance profile")
fmt.Println(" vssm start <name> Launches an existing server instance using stored profile")
fmt.Println(" vssm daemon Starts the daemon")
fmt.Println(" vssm create <name> <version> Creates the instance configuration and profile")
fmt.Println(" vssm delete <name> <options> Deletes an instance profile, optionally deletes all files with the `--purge` flag")
fmt.Println(" vssm start <name> Launches an existing server instance from a stored profile")
fmt.Println(" vssm stop <name> Gracefully shuts down a server instance")
fmt.Println(" vssm cmd <name> \"<command>\" Dispatches a terminal console command down the pipe")
fmt.Println(" vssm list Displays the operational matrix of all instances")
fmt.Println(" vssm cmd <name> \"<command>\" Sends a command to an instance")
fmt.Println(" vssm list Displays a list of all instances and their status")
}