4 ms·
> What if the file name is not valid UTF-8, though They could support passing filename as `string | []byte`. But wait, go does not even have union types.
by silverwind 1y ago
> What if the file name is not valid UTF-8, though
They could support passing filename as `string | []byte`. But wait, go does not even have union types.
- lblume 1y agoBut []byte, or a wrapper like Path, is enough, if strings are easily convertible into it. Rust does it that way via the AsRef<T> trait.