Skip to content
Myr

Fix more typos in examples (#102)

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

authored by Ilya Revenko · committed by GitHub · parent da9e8ee · Browse files · 3 files+3 added−3 removed
This commit

State

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

Diff stats

3 files+3 added−3 removed

  • other:+3 added−3 removed

3 files+3 added−3 removed

modified:examples/glamour/main.go+1 added-1 removed
107 unmodified lines
108109func main() {110 model, err := newExample()111 if err != nil {112 fmt.Println("Could not intialize Bubble Tea model:", err)112 fmt.Println("Could not initialize Bubble Tea model:", err)113 os.Exit(1)114 }115116 if err := tea.NewProgram(model).Start(); err != nil {
4 unmodified lines
modified:examples/realtime/main.go+1 added-1 removed
18 unmodified lines
1920// Simulate a process that sends events at an irregular interval in real time.21// In this case, we'll send events on the channel at a random interval between22// 100 to 1000 milliseconds. As a command, Bubble Tea will run this23// asyncronously.23// asynchronously.24func listenForActivity(sub chan struct{}) tea.Cmd {25 return func() tea.Msg {26 for {27 time.Sleep(time.Millisecond * time.Duration(rand.Int63n(900)+100))
65 unmodified lines
modified:examples/simple/main.go+1 added-1 removed
39 unmodified lines
40}4142// Update is called when messages are received. The idea is that you inspect the43// message and send back an updated model accordingly. You can also return44// a command, which is a function that peforms I/O and returns a message.44// a command, which is a function that performs I/O and returns a message.45func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {46 switch msg.(type) {47 case tea.KeyMsg:48 return m, tea.Quit
24 unmodified lines