MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / usage

Function usage

cmd/test-conn/main-test-conn.go:19–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17)
18
19func usage() {
20 fmt.Fprintf(os.Stderr, `Test Harness for SSH Connection Flows
21
22Usage:
23 test-conn [flags] <command> <user@host> [args...]
24
25Commands:
26 connect <user@host> - Test basic SSH connection with wsh
27 ssh <user@host> - Test basic SSH connection
28 exec <user@host> <command> - Execute command and show output (no wsh)
29 wshexec <user@host> <command> - Execute command with wsh enabled
30 shell <user@host> - Start interactive shell session
31
32Flags:
33 -t duration Connection timeout (default: 60s)
34 -i Interactive mode (prompt for user input instead of auto-accept)
35 -v Show version and exit
36
37Examples:
38 test-conn ssh user@example.com
39 test-conn exec user@example.com "ls -la"
40 test-conn wshexec user@example.com "wsh version"
41 test-conn -i connect user@example.com
42 test-conn shell user@example.com
43
44`)
45 os.Exit(1)
46}
47
48func main() {
49 timeoutFlag := flag.Duration("t", 60*time.Second, "connection timeout")

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected