|
|
|
@ -38,10 +38,14 @@ var nearbyCommand = &Command{
|
|
|
|
|
log_error("unable to get neighbors: %v", err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
fmt.Fprintf(conn, "--------------------------------------------------------------------------------\n")
|
|
|
|
|
fmt.Fprintf(conn, "%-4s %-20s %s\n", "id", "name", "travel time")
|
|
|
|
|
fmt.Fprintf(conn, "--------------------------------------------------------------------------------\n")
|
|
|
|
|
for _, neighbor := range neighbors {
|
|
|
|
|
other := index[neighbor.id]
|
|
|
|
|
fmt.Fprintf(conn, "%-4d %-20s %v\n", other.id, other.name, system.TravelTimeTo(other))
|
|
|
|
|
}
|
|
|
|
|
fmt.Fprintf(conn, "--------------------------------------------------------------------------------\n")
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|