While reading this article:
https://golang.org/doc/articles/wiki/
I got to the point where the author is explaining how the makeHandler function uses the regex created earlier to validate the title provided by the user.
The closure extracts the title from the request path, and validates it with the TitleValidator regexp.
The actual variable name is validPath. From the way the explanation is written, it seems that the text should instead be:
The closure extracts the title from the request path, and validates it with the validPath regexp.
Many thanks for writing this article. I learned a lot and plan to reference it often as I continue to learn more about Go and writing web apps.
While reading this article:
https://golang.org/doc/articles/wiki/
I got to the point where the author is explaining how the
makeHandlerfunction uses the regex created earlier to validate thetitleprovided by the user.The actual variable name is
validPath. From the way the explanation is written, it seems that the text should instead be:Many thanks for writing this article. I learned a lot and plan to reference it often as I continue to learn more about Go and writing web apps.