MCPcopy
hub / github.com/syncthing/syncthing / printService

Function printService

lib/syncthing/syncthing.go:461–474  ·  view source on GitHub ↗
(w io.Writer, svc interface{}, level int)

Source from the content-addressed store, hash-verified

459}
460
461func printService(w io.Writer, svc interface{}, level int) {
462 type errorer interface{ Error() error }
463
464 t := "-"
465 if _, ok := svc.(supervisor); ok {
466 t = "+"
467 }
468 fmt.Fprintln(w, strings.Repeat(" ", level), t, svc)
469 if es, ok := svc.(errorer); ok {
470 if err := es.Error(); err != nil {
471 fmt.Fprintln(w, strings.Repeat(" ", level), " ->", err)
472 }
473 }
474}
475
476type lateAddressLister struct {
477 discover.AddressLister

Callers 1

printServiceTreeFunction · 0.85

Calls 1

ErrorMethod · 0.65

Tested by

no test coverage detected