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 support for changing the default file mode using options pattern (fixes natefinch/atomic#7) #18

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sdassow
Copy link

@sdassow sdassow commented Feb 18, 2022

Something about #12 didn't feel right or clean enough, so here's an alternative approach using the options pattern instead.
While this increases complexity a bit, it comes with the benefit of a clean interface in case of further options.

@sdassow
Copy link
Author

sdassow commented Feb 19, 2022

Now after renaming the option from FileMode to DefaultFileMode, it would be possible to add a FileMode option with the same semantics a FileMode in the function signature would have (like os.WriteFile() for example), which in turn could be an answer to #7 as well.

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