1. 42

There are a number of discussions around this (and a number of related links for each proposal), though the official discussions seem to be on Reddit.

FS:

Embed:

I’ve submitted this as a single link as they are directly related and submitting each link separately would inevitably lead to linking between the two, but if the mods want these can be resubmitted as multiple posts.

  1.  

  2. 5

    This is very welcome and means one less dependency for my Go projects.

    1. 5

      Unfortunately io/fs makes heavy use of interface upgrades, which make the common and extremely useful decorator/middleware pattern awkward to impossible to do.

      1. 1

        I was noticing this as well. I’m a little familiar with billy which is used in go-git, but under the current design, I believe this would still unfortunately need to exist.

      2. 2

        I wish every language did this. Viewing “the” file system as a global singleton makes testing harder.

        1. 1

          I have been playing around with pledge(2) and unveil(2) in Go. Having files embedded might mean that you can skip on or reduce what you need to unveil. I think this might also be interesting for other kinds of isolation, where you can reduce the need for file system access and might potential bring up interesting use cases on targets like wasm.

          1. 1

            Very neat. Can’t wait to give embed the axe.