62dcadceb8
16 constructores puros (NewList, NewSpinner, NewProgress, DefaultStyles...), 4 runners impuros (RunModel, RunFullscreen, RunWithMouseSupport, Confirm), 5 print helpers impuros (PrintSuccess/Error/Warning/Info/Muted) y 4 utilidades puras (Quit, ClearScreen, HideCursor, ShowCursor). Stubs que documentan devfactory/tui para el registry.
38 lines
846 B
Markdown
38 lines
846 B
Markdown
---
|
|
name: confirm_prompt
|
|
kind: function
|
|
lang: go
|
|
domain: tui
|
|
version: "1.0.0"
|
|
purity: impure
|
|
signature: "func Confirm(prompt string) core.Result[bool]"
|
|
description: "Muestra un dialogo de confirmacion Si/No en terminal y devuelve la eleccion del usuario."
|
|
tags: [tui, confirm, prompt, interactive]
|
|
uses_functions: []
|
|
uses_types: [result_go_core]
|
|
returns: [result_go_core]
|
|
returns_optional: false
|
|
error_type: "error_go_core"
|
|
imports: []
|
|
tested: false
|
|
tests: []
|
|
test_file_path: ""
|
|
file_path: "functions/tui/confirm_prompt.go"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```go
|
|
result := tui.Confirm("¿Deseas continuar?")
|
|
if result.IsErr() {
|
|
log.Fatal(result.Error())
|
|
}
|
|
if result.Unwrap() {
|
|
fmt.Println("Confirmado")
|
|
}
|
|
```
|
|
|
|
## Notas
|
|
|
|
Implementacion real en github.com/lucasdataproyects/devfactory/tui. Este stub existe para documentar la firma y mantener el registry.
|