MCPcopy Index your code
hub / github.com/go-task/task / Update

Method Update

internal/input/input.go:113–131  ·  view source on GitHub ↗
(msg tea.Msg)

Source from the content-addressed store, hash-verified

111}
112
113func (m textModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
114 switch msg := msg.(type) {
115 case tea.KeyPressMsg:
116 switch msg.Keystroke() {
117 case "ctrl+c", "escape":
118 m.cancelled = true
119 m.done = true
120 return m, tea.Quit
121 case "enter":
122 m.value = m.textInput.Value()
123 m.done = true
124 return m, tea.Quit
125 }
126 }
127
128 var cmd tea.Cmd
129 m.textInput, cmd = m.textInput.Update(msg)
130 return m, cmd
131}
132
133func (m textModel) View() tea.View {
134 if m.done {

Callers

nothing calls this directly

Calls 1

ValueMethod · 0.65

Tested by

no test coverage detected