Skip to content

Add support for changing the default file mode using options pattern (fixes natefinch/atomic#7)#18

Open
sdassow wants to merge 6 commits intonatefinch:masterfrom
sdassow:add-filemode-option
Open

Add support for changing the default file mode using options pattern (fixes natefinch/atomic#7)#18
sdassow wants to merge 6 commits intonatefinch:masterfrom
sdassow:add-filemode-option

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