{"modulePath":"github.com/wolfi-dev/wolfictl","version":"v0.39.33","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ctrlcwrapper\n\n## Functions\n\n```go\nfunc InnerIsReady() tea.Msg\n```\nInnerIsReady is a tea.Cmd that the inner model can send to the wrapper model to indicate that it's ready to exit. This is helpful to the overall program because it allows the wrapper to exit earlier than it would if it waited for its own internal tick expiration event.\n\n```go\nfunc New[T tea.Model](inner T) tea.Model\n```\nNew returns a new model that wraps the given model. The new model will exit when the user presses Ctrl+C.\n\n## Types\n\n```go\ntype AboutToExitMsg struct{}\n```\n\n```go\ntype Any interface {\n\tUserWantsToExit() bool\n}\n```\nAny is a type that can be used to check if a model is a Model without knowing the inner type.\n\n```go\ntype Model[T tea.Model] struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (m Model[T]) Init() tea.Cmd\n```\n\n```go\nfunc (m Model[T]) Unwrap() T\n```\nUnwrap returns the inner model with its original type.\n\n```go\nfunc (m Model[T]) Update(msg tea.Msg) (tea.Model, tea.Cmd)\n```\n\n```go\nfunc (m Model[T]) UserWantsToExit() bool\n```\nUserWantsToExit returns true if the user pressed Ctrl+C. This can be used when the bubbletea program exits to determine if the user wants to exit the program.\n\n```go\nfunc (m Model[T]) View() string\n```\n\n","path":"github.com/wolfi-dev/wolfictl/pkg/cli/components/ctrlcwrapper","name":"ctrlcwrapper","synopsis":"","isRedistributable":true}
