When conducting tests, there are times when I want to create a read-only file,
But i found that there is no option available to create a read-only file.
I know there is ReadOnlyFs already, but new a fs seems unnecessary to me.
I found func Create in memmap.go
func (m *MemMapFs) Create(name string) (...
Go 1.21 just dropped :) And with that, WASIp1 support :D
However this package fails to compile:
$ GOOS=wasip1 GOARCH=wasm go build
# github.com/spf13/afero
../../../../go/pkg/mod/github.com/spf13/[email protected]/const_win_unix.go:22:23: undefined: syscall.EBADFD
I have run the following test on Windows with attached valid zip file testunzip.zip and I am getting the following errors
readdir \: The system cannot find the file specified.
when calling Readdirnames or Readdir
func TestZipFS2(t *testing.T) {
zrc, err := zip.OpenReader("testdata/testunzip.zip")...
Hello, we are a team researching the dependency management mechanism of Golang. During our analysis, we came across your project and noticed that it contains a vulnerability (CVE-2022-32149). In your project, the golang.org/x/text package is being used at version golang.org/x/text v0.3.7, but the pa...
I recently update a project from v1.3.3 to v1.8.2 and it looks like file mode is not preserved when creating files using MemMapFs.
I'm trying to write a file with os.ModeSocket to a MemMapFs instance in a test. After writing the file, I can see that os.ModeSocket is not set. It looks like this is ca...
Hi, here's the reproduction of the issue: https://go.dev/play/p/Kl7rlp4q_ZO
basically when using CacheOnReadFs with any base layer it fails with "bad file descriptor" error.
I am using 1.9.5
when trying to remove a file such as /tmp/test-973171232/testDir/test-129751122.test using MemMapFS, I am getting a panic
panic: parent of /tmp/test-973171232/testDir/test-129751122.test is nil coming from unRegisterWithParent (
afero/memmap.go
Line...
As the title says is it possible to convert and embed.FS to a MemMapFS? This way I can make the memory FS writable too.
I want to use that FS within fiber, this FS will contains html templates, so a wanna have a set of predefined/default templates defined as (embed.FS) but I also want to be able to...