We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have an MemMapFs with the following structure:
([]os.FileInfo) (len=1 cap=1) { (*mem.FileInfo)(0xc420098080)({ FileData: (*mem.FileData)(0xc4200a6300)({ Mutex: (sync.Mutex) { state: (int32) 0, sema: (uint32) 0 }, name: (string) (len=44) "abc.txt_a3171851-d16d-4b27-a790-1a4d3d4f221a", data: ([]uint8) (len=11 cap=16) { 00000000 48 65 6c 6c 6f 20 47 6f 6c 70 21 |Hello Golp!| }, memDir: (mem.Dir) <nil>, dir: (bool) false, mode: (os.FileMode) T---------, modtime: (time.Time) 2018-12-01 09:58:08.052452176 +0100 CET m=+0.001122979 }) }) }
(One file named: abc.txt_a3171851-d16d-4b27-a790-1a4d3d4f221a)
abc.txt_a3171851-d16d-4b27-a790-1a4d3d4f221a
So it should only call the walkFn once.
walkFn
afero.Walk(i.Fs(), "/", func(path string, info os.FileInfo, err error) error { spew.Dump(info) return nil })
But the above code results in:
(*mem.FileInfo)(0xc42000e088)({ FileData: (*mem.FileData)(0xc420068300)({ Mutex: (sync.Mutex) { state: (int32) 0, sema: (uint32) 0 }, name: (string) (len=1) "/", data: ([]uint8) <nil>, memDir: (*mem.DirMap)(0xc42000e078)((len=1) { (string) (len=44) "abc.txt_2d83e30d-bf11-4953-8ebb-fdb2e91235cc": (*mem.FileData)(0xc420068360)({ Mutex: (sync.Mutex) { state: (int32) 0, sema: (uint32) 0 }, name: (string) (len=44) "abc.txt_2d83e30d-bf11-4953-8ebb-fdb2e91235cc", data: ([]uint8) (len=11 cap=16) { 00000000 48 65 6c 6c 6f 20 47 6f 6c 70 21 |Hello Golp!| }, memDir: (mem.Dir) <nil>, dir: (bool) false, mode: (os.FileMode) T---------, modtime: (time.Time) 2018-12-01 09:53:37.422059676 +0100 CET m=+0.001065426 }) }), dir: (bool) true, mode: (os.FileMode) ----------, modtime: (time.Time) 0001-01-01 00:00:00 +0000 UTC }) }) (*mem.FileInfo)(0xc42000e100)({ FileData: (*mem.FileData)(0xc420068600)({ Mutex: (sync.Mutex) { state: (int32) 0, sema: (uint32) 0 }, name: (string) (len=1) "/", data: ([]uint8) <nil>, memDir: (*mem.DirMap)(0xc42000e0b0)((len=1) { (string) (len=1) "/": (*mem.FileData)(0xc420068600)(<already shown>) }), dir: (bool) true, mode: (os.FileMode) T---------, modtime: (time.Time) 2018-12-01 09:53:37.424199616 +0100 CET m=+0.003205398 }) }) (*mem.FileInfo)(0xc420174010)({ FileData: (*mem.FileData)(0xc420068720)({ Mutex: (sync.Mutex) { state: (int32) 0, sema: (uint32) 0 }, name: (string) (len=1) "/", data: ([]uint8) <nil>, memDir: (*mem.DirMap)(0xc42000e110)((len=1) { (string) (len=1) "/": (*mem.FileData)(0xc420068720)(<already shown>) }), dir: (bool) true, mode: (os.FileMode) T---------, modtime: (time.Time) 2018-12-01 09:53:37.425307087 +0100 CET m=+0.004312958 }) }) (*mem.FileInfo)(0xc420174070)({ FileData: (*mem.FileData)(0xc42017e0c0)({ Mutex: (sync.Mutex) { state: (int32) 0, sema: (uint32) 0 }, name: (string) (len=1) "/", data: ([]uint8) <nil>, memDir: (*mem.DirMap)(0xc420174020)((len=1) { (string) (len=1) "/": (*mem.FileData)(0xc42017e0c0)(<already shown>) }), dir: (bool) true, mode: (os.FileMode) T---------, modtime: (time.Time) 2018-12-01 09:53:37.426633396 +0100 CET m=+0.005639164 }) }) // It goes on forever
So the walkFn is called once for the file and an infinite amount of times for /. (It doesn't work with . instead of / either)
/
.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I have an MemMapFs with the following structure:
(One file named:
abc.txt_a3171851-d16d-4b27-a790-1a4d3d4f221a
)So it should only call the
walkFn
once.But the above code results in:
So the
walkFn
is called once for the file and an infinite amount of times for/
.(It doesn't work with
.
instead of/
either)The text was updated successfully, but these errors were encountered: