Skip to content

x/website: Potential reference to wrong variable name "TitleValidator" #36779

@atc0005

Description

@atc0005

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions