mirror of
https://github.com/nxtrace/NTrace-core.git
synced 2026-11-29 16:13:03 +00:00
22 lines
448 B
Go
22 lines
448 B
Go
package printer
|
|
|
|
import (
|
|
"github.com/nxtrace/NTrace-core/internal/hoprender"
|
|
"github.com/nxtrace/NTrace-core/trace"
|
|
)
|
|
|
|
func RealtimePrinter(res *trace.Result, ttl int) {
|
|
printRealtimeTTL(ttl)
|
|
groups := hoprender.GroupHopAttempts(res.Hops[ttl])
|
|
if len(groups) == 0 {
|
|
printRealtimeEmptyHop()
|
|
return
|
|
}
|
|
|
|
blockDisplay := false
|
|
for _, group := range groups {
|
|
renderRealtimeHopLine(res, ttl, group, blockDisplay)
|
|
blockDisplay = true
|
|
}
|
|
}
|