(ctx context.Context)
| 424 | } |
| 425 | |
| 426 | func (ch *CommandHandler) handleVersionCommand(ctx context.Context) { |
| 427 | versionInfo := version.GetCurrentVersion() |
| 428 | |
| 429 | // Checagem com timeout |
| 430 | ctx, cancel := context.WithTimeout(ctx, 5*time.Second) |
| 431 | defer cancel() |
| 432 | latest, hasUpdate, err := version.CheckLatestVersionWithContext(ctx) |
| 433 | |
| 434 | // Exibir as informações formatadas |
| 435 | fmt.Println(version.FormatVersionInfo(versionInfo, latest, hasUpdate, err)) |
| 436 | } |