Skip to content
Myr

Improve some comments

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent e90039d · Browse files · 1 file+10 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−6 removed

  • other:+10 added−6 removed

1 file+10 added−6 removed

modified:tea.go+10 added-6 removed
14 unmodified lines
1516// Model contains the program's state.17type Model interface{}1819// Cmd is an IO operation. If it's nil it's considered a no-op. Keep in mind20// that there's almost never a need to use a command to send a message to21// another part of your program.19// Cmd is an IO operation. If it's nil it's considered a no-op. Use it for20// things like HTTP requests, timers, saving and loading from disk, and so on.21//22// There's almost never a need to use a command to send a message to another23// part of your program. Instead, it can almost always be done in the update24// function.25type Cmd func() Msg2627// Batch peforms a bunch of commands concurrently with no ordering guarantees28// about the results.
9 unmodified lines
38// Init is the first function that will be called. It returns your initial39// model and runs an optional command.40type Init func() (Model, Cmd)4139// Update is called when a message is received. It may update the model and/or40// send a command.42// Update is called when a message is received. Use it to inspect messages and,43// in repsonse, update the model and/or send a command.44type Update func(Msg, Model) (Model, Cmd)4543// View produces a string which will be rendered to the terminal.46// View renders the program's UI: a string which will be printed to the47// terminal. The view is rendered after every Update.48type View func(Model) string4950// Program is a terminal user interface.51type Program struct {
190 unmodified lines