Skip to content
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

Add path.Format #216

Merged
merged 4 commits into from
Aug 31, 2024
Merged

Add path.Format #216

merged 4 commits into from
Aug 31, 2024

Conversation

EdSchouten
Copy link
Member

Right now UNIX-style, Windows-style and local path parsers can all be created through free functions. However, there are cases in which you may want to pass along a pathname style. For example, to force parsing of UNIX-style paths as part of unit tests.

This change adds a new interface type named path.Format and moves the free functions into them. This is similar to how encoding/binary offers {Little,Big}Endian.

Right now UNIX-style, Windows-style and local path parsers can all be
created through free functions. However, there are cases in which you
may want to pass along a pathname style. For example, to force parsing
of UNIX-style paths as part of unit tests.

This change adds a new interface type named path.Format and moves the
free functions into them. This is similar to how encoding/binary offers
{Little,Big}Endian.
@EdSchouten EdSchouten merged commit af9ad48 into master Aug 31, 2024
1 check passed
@EdSchouten EdSchouten deleted the eschouten/20240831-format branch August 31, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant