From f905b977566168f31acd141493722f2e6d9e4785 Mon Sep 17 00:00:00 2001 From: Dakota Walsh Date: Sat, 27 Aug 2022 19:03:40 +1200 Subject: [PATCH] docs: fix typo The previous example was wrong and would result in the following compiler error: error (type) is not an expression Just a simple typo, I've changed it to err to correctly reference the function scoped variable named err. --- exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.go b/exec.go index 587d91a..53bf5d4 100644 --- a/exec.go +++ b/exec.go @@ -39,7 +39,7 @@ func Exec(c ExecCommand, fn ExecCallback) Cmd { // c := exec.Command("vim", "file.txt") // // cmd := ExecProcess(c, func(err error) Msg { -// return VimFinishedMsg{err: error} +// return VimFinishedMsg{err: err} // }) // // Or, if you don't care about errors, you could simply: