]> Cypherpunks repositories - gostls13.git/commitdiff
doc/articles/wiki: use correct variable name in closures guide
authorHowJMay <vulxj0j8j8@gmail.com>
Fri, 20 Mar 2020 08:40:38 +0000 (08:40 +0000)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Fri, 20 Mar 2020 08:42:30 +0000 (08:42 +0000)
Fixes non-existent variable TitleValidator to be validPath in
the closures, functions literal section.

Fixes #36779

Change-Id: I59762c358c3e00d1cc03d9d1e2aace03f145321d
GitHub-Last-Rev: a5e9b17a3707fc48c6d87bab3a4968f2ef63ab65
GitHub-Pull-Request: golang/go#36783
Reviewed-on: https://go-review.googlesource.com/c/go/+/216479
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
doc/articles/wiki/index.html

index f8144bbac334b8d62c639244d6f6f46e5ead5ec5..4e3a5deab56639cc017b17dc46eaec413bd9f275 100644 (file)
@@ -674,7 +674,7 @@ The closure returned by <code>makeHandler</code> is a function that takes
 an <code>http.ResponseWriter</code> and <code>http.Request</code> (in other
 words, an <code>http.HandlerFunc</code>).
 The closure extracts the <code>title</code> from the request path, and
-validates it with the <code>TitleValidator</code> regexp. If the
+validates it with the <code>validPath</code> regexp. If the
 <code>title</code> is invalid, an error will be written to the
 <code>ResponseWriter</code> using the <code>http.NotFound</code> function.
 If the <code>title</code> is valid, the enclosed handler function