Skip to content

Commit 9d468f4

Browse files
howjmayodeke-em
authored andcommitted
doc/articles/wiki: use correct variable name in closures guide
Fixes non-existent variable TitleValidator to be validPath in the closures, functions literal section. Fixes #36779 Change-Id: I59762c358c3e00d1cc03d9d1e2aace03f145321d GitHub-Last-Rev: a5e9b17 GitHub-Pull-Request: #36783 Reviewed-on: https://go-review.googlesource.com/c/go/+/216479 Reviewed-by: Emmanuel Odeke <[email protected]>
1 parent 635a830 commit 9d468f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/articles/wiki/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ <h2>Introducing Function Literals and Closures</h2>
674674
an <code>http.ResponseWriter</code> and <code>http.Request</code> (in other
675675
words, an <code>http.HandlerFunc</code>).
676676
The closure extracts the <code>title</code> from the request path, and
677-
validates it with the <code>TitleValidator</code> regexp. If the
677+
validates it with the <code>validPath</code> regexp. If the
678678
<code>title</code> is invalid, an error will be written to the
679679
<code>ResponseWriter</code> using the <code>http.NotFound</code> function.
680680
If the <code>title</code> is valid, the enclosed handler function

0 commit comments

Comments
 (0)