fix: minor tea.Cmd tutorial syntax typo

`errMsg(err)` -> `errMsg{err}`

Just noticed this while reading over the tutorial docs and figured I'd throw up a quick PR to address it.

Really enjoying the tooling so far, thank you for creating it!
This commit is contained in:
Christopher Stingl
2022-02-28 16:28:26 -05:00
committed by Christian Rocha
parent 3b83e703b5
commit a57af578f0

View File

@@ -202,7 +202,7 @@ func checkSomeUrl(url string) tea.Cmd {
c := &http.Client{Timeout: 10 * time.Second}
res, err := c.Get(url)
if err != nil {
return errMsg(err)
return errMsg{err}
}
return statusMsg(res.StatusCode)
}