MCPcopy Create free account
hub / github.com/diillson/chatcli / handleVersionCommand

Method handleVersionCommand

cli/cli_config.go:426–436  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

424}
425
426func (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}

Callers 2

HandleCommandMethod · 0.95
TestHandleVersionCommandFunction · 0.95

Calls 3

GetCurrentVersionFunction · 0.92
FormatVersionInfoFunction · 0.92

Tested by 1

TestHandleVersionCommandFunction · 0.76