Skip to content

Should use path.Match instead of filepath.Match #451

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

Closed
MagicalTux opened this issue Jun 3, 2024 · 4 comments · Fixed by #452
Closed

Should use path.Match instead of filepath.Match #451

MagicalTux opened this issue Jun 3, 2024 · 4 comments · Fixed by #452
Labels
Milestone

Comments

@MagicalTux
Copy link

https://github.com/nhooyr/websocket/blob/v1.8.11/accept.go#L237

Typically, path/filepath is used for OS-specific paths/etc while path has a OS neutral Match() method that works exactly the same in most cases.

A network lib shouldn't be using methods which behavior might vary depending on the OS.

@nhooyr
Copy link
Contributor

nhooyr commented Jun 3, 2024

Good catch!

@nhooyr nhooyr added the bug label Jun 3, 2024
@nhooyr nhooyr added this to the v1.8.11 milestone Jun 3, 2024
@KianYang-Lee
Copy link
Contributor

@nhooyr @MagicalTux I can submit a PR for this if that's OK with both of you

@nhooyr
Copy link
Contributor

nhooyr commented Jun 4, 2024

Go for it @KianYang-Lee!

@KianYang-Lee
Copy link
Contributor

is there a CONTRIBUTING.md for this @nhooyr so that proper steps can be taken before opening PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants