It provides an afero filesystem implementation of an opfs backend.
This was created to provide a backend when used in wasm.
I'm very opened to any improvement through issues or pull-request that might lead to a better implementation or even better testing.
import(
"github.com/insensatestone/afero-opfs/pkg"
)
func main() {
opfs,_ := opfs.NewFs()
// And do your thing
file, _ := fs.OpenFile("file.txt", os.O_WRONLY, 0777)
file.WriteString("Hello world !")
file.Close()
}