| 330 | } |
| 331 | |
| 332 | func renderAgentVersion(agentVersion, serverVersion string) string { |
| 333 | if agentVersion == "" { |
| 334 | agentVersion = "(unknown)" |
| 335 | } |
| 336 | if !semver.IsValid(serverVersion) || !semver.IsValid(agentVersion) { |
| 337 | return pretty.Sprint(DefaultStyles.Placeholder, agentVersion) |
| 338 | } |
| 339 | outdated := semver.Compare(agentVersion, serverVersion) < 0 |
| 340 | if outdated { |
| 341 | return pretty.Sprint(DefaultStyles.Warn, agentVersion+" (outdated)") |
| 342 | } |
| 343 | return pretty.Sprint(DefaultStyles.Keyword, agentVersion) |
| 344 | } |
| 345 | |
| 346 | func renderPipe(idx, total int) string { |
| 347 | if idx == total-1 { |