natefinch / atomic

atomic is a go package for atomic file writing
MIT License
200 stars 12 forks source link

Wrap any copier to make it write atomically #22

Closed adowair closed 1 year ago

adowair commented 2 years ago

This commit introduces WrapCopier, which returns a function that implements exactly the functionality of atomic.WriteFile, except with a custom copier. This can be useful when some custom copy behavior (other than io.Copy) is desired.

This PR resolves #21.

adowair commented 1 year ago

Closing this pull request as it has not received feedback.