Skip to content

Conversation

dzbarsky
Copy link

A well-behaved FS implementation should not mutate the bytes to be written. (Also, it seems like many call sites already have an []byte and convert to a string just to call WriteFile)

@jakebailey
Copy link
Member

(Also, it seems like many call sites already have an []byte and convert to a string just to call WriteFile)

For fun, I went to try and refactor file writing to see if using []byte were possible all the way, but it is a lot of changes. Reading as strings is pretty intentional so things kinda bubble from there. But maybe it's possible.

It'd be interesting to see your benchmarks for your PRs.

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.

2 participants