MCPcopy Index your code
hub / github.com/coder/coder / Write

Method Write

cli/cliui/agent.go:485–506  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

483}
484
485func (d ConnDiags) Write(w io.Writer) {
486 _, _ = fmt.Fprintln(w, "")
487 general, client, agent := d.splitDiagnostics()
488 for _, msg := range general {
489 _, _ = fmt.Fprintln(w, msg)
490 }
491 if len(general) > 0 {
492 _, _ = fmt.Fprintln(w, "")
493 }
494 if len(client) > 0 {
495 _, _ = fmt.Fprint(w, "Possible client-side issues with direct connection:\n\n")
496 for _, msg := range client {
497 _, _ = fmt.Fprintf(w, " - %s\n\n", msg)
498 }
499 }
500 if len(agent) > 0 {
501 _, _ = fmt.Fprint(w, "Possible agent-side issues with direct connections:\n\n")
502 for _, msg := range agent {
503 _, _ = fmt.Fprintf(w, " - %s\n\n", msg)
504 }
505 }
506}
507
508func (d ConnDiags) splitDiagnostics() (general, client, agent []string) {
509 if d.AgentNetcheck != nil {

Callers 1

pingMethod · 0.95

Calls 1

splitDiagnosticsMethod · 0.95

Tested by

no test coverage detected