Skip to content

Commit

Permalink
Fix various typos in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Mar 12, 2021
1 parent d2c1d9b commit a7ce0c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions examples/pager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
// Because we're using the viewport's default update function (with pager-
// style navigation) it's important that the viewport's update function:
//
// * Recieves messages from the Bubble Tea runtime
// * Receives messages from the Bubble Tea runtime
// * Returns commands to the Bubble Tea runtime
//
m.viewport, cmd = m.viewport.Update(msg)
Expand All @@ -136,7 +136,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {

func (m model) View() string {
if !m.ready {
return "\n Initalizing..."
return "\n Initializing..."
}

headerTop := "╭───────────╮"
Expand Down
2 changes: 1 addition & 1 deletion examples/realtime/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
tea "github.com/charmbracelet/bubbletea"
)

// A message used to indicate that activity has occured. In the real world (for
// A message used to indicate that activity has occurred. In the real world (for
// example, chat) this would contain actual data.
type responseMsg struct{}

Expand Down
4 changes: 2 additions & 2 deletions examples/simple/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ func (m model) Init() tea.Cmd {
return tick
}

// Update is called when messages are recived. The idea is that you inspect the
// Update is called when messages are received. The idea is that you inspect the
// message and send back an updated model accordingly. You can also return
// a commmand, which is a function that peforms I/O and returns a message.
// a command, which is a function that peforms I/O and returns a message.
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg.(type) {
case tea.KeyMsg:
Expand Down
6 changes: 3 additions & 3 deletions examples/views/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
}

// Hand off the message and model to the approprate update function for the
// Hand off the message and model to the appropriate update function for the
// appropriate view based on the current state.
if !m.Chosen {
return updateChoices(msg, m)
}
return updateChosen(msg, m)
}

// The main view, which just calls the approprate sub-view
// The main view, which just calls the appropriate sub-view
func (m model) View() string {
var s string
if m.Quitting {
Expand Down Expand Up @@ -273,7 +273,7 @@ func makeRamp(colorA, colorB string, steps float64) (s []string) {
return
}

// Convert a colorful.Color to a hexidecimal format compatible with termenv.
// Convert a colorful.Color to a hexadecimal format compatible with termenv.
func colorToHex(c colorful.Color) string {
return fmt.Sprintf("#%s%s%s", colorFloatToHex(c.R), colorFloatToHex(c.G), colorFloatToHex(c.B))
}
Expand Down

0 comments on commit a7ce0c8

Please sign in to comment.