Fix typos and wording in the command tutorial
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 213f179 · Browse files · 1 file·+14 added−14 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+14 added−14 removed
- other:+14 added−14 removed
Provenance
- Commit
7e36944- Tree
df2851e- Author
Christian Rocha <christian@rocha.is>- Committer
Christian Rocha <christian@rocha.is>- Parent
213f179
1 file changed+14 added−14 removed
modified:tutorials/commands/README.md+14 added-14 removed
11 unmodified lines12 13 ## Let's Go!14 15 For this tutorial we're building a very simple program that makes an HTTP16-request to a server over HTTP and reports the status code of the response.16+request to a server and reports the status code of the response.17 18 We'll import a few necessary packages and put the URL we're going to check in19 a `const`.20 13 unmodified lines34 ```35 36 ## The Model37 38-Next we'll define our model. The only things we need to store are the HTTP39-response and a possible error.38+Next we'll define our model. The only things we need to store are the status39+code of HTTP response and a possible error.40 41 ```go42 type model struct {43 status int31 unmodified lines75 type statusMsg int76 type errMsg error77 ```78 79-And notice that we've defined two new `Msg` types. They can be any type, even a80-struct. We'll come back to them later later in our update function.79+And notice that we've defined two new `Msg` types. They can be any type, even80+an empty struct. We'll come back to them later later in our update function.81 First, let's write our initialization function.82 83 ## The Initialization Function84 85-The initilization function is incredibly simple. We return an empty model and86-fire off the `Cmd` we made earlier.85+The initilization function is very simple. We return an empty model and the86+the `Cmd` we made earlier. Note that we don't call the function; the Bubble Tea87+runtime will do that when the time is right.88 89 ```go90 func initialize() (tea.Model, tea.Cmd) {91 return model{}, checkServer25 unmodified lines117 return m, tea.Quit118 119 case tea.KeyMsg:120 // Ctrl+c quits. Even with short running programs it's good to have120- // an quit key, just incase your logic is off. Users will be very121+ // a quit key, just incase your logic is off. Users will be very122 // annoyed if they can't exit.123 if msg.Type == tea.KeyCtrlC {124 return m, tea.Quit125 }43 unmodified lines169 }170 }171 ```172 172-And that's that! There's one more thing you should is helpful to know about173+And that's that. There's one more thing you should is helpful to know about174 `Cmd`s, though.175 176 ## One More Thing About Commands177 21 unmodified lines199 that's the one that runs asynchronously.200 201 ## Anyway, Now What?202 202-After doing this tutorial and [the previous one][basics] you should be ready203-to build a Bubble Tea program of your own.203+After doing this tutorial and [the previous one][basics] you should be ready to204+build a Bubble Tea program of your own. We also recommend that you look at the205+Bubble Tea [example programs][examples] as well as [Bubbles][bubbles],206+a component library for Bubble Tea.207 205-We also recommend that you look at the Bubble Tea [example programs][examples]206-as well as [Bubbles][bubbles], a component library for Bubble Tea.207-208 And, of course, check out the [Go Docs][docs].209 210 ### Bubble Tea in the Wild211 27 unmodified lines