-
Notifications
You must be signed in to change notification settings - Fork 17.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
path/filepath: HasPrefix should be marked deprecated #18355
Comments
Just send it now for Go 1.8. It's only docs. |
CL https://golang.org/cl/34554 mentions this issue. |
Opened #18358 to investigate actually fixing this function. |
Just checking: this function is deprecated, and there is no alternative? Maybe a regex.Match? I assume that's why there's interest in fixing. |
@RobbieMcKinstry, your comment would be better on an open bug, like #18358. Closed bugs aren't tracked. |
Thank you Brad! Still learning! :) |
The documentation for
filepath.HasPrefix
says:We should switch this to use the "Deprecated:" tag so that tools can flag new uses of this.
As it is currently implemented, it is misleading because it only does
strings.HasPrefix
and does not actually match on patch segments. Thus, the following reports true, which is surprising:\cc @neild
The text was updated successfully, but these errors were encountered: