On Thu, Mar 24, 2022 at 10:54 AM Tamás Gulácsi <tgulacs...@gmail.com> wrote: > > I'd like to thank The Google Authors for > https://pkg.go.dev/testing/fstest#MapFS - it just needed a very little > tweaking to serve as a zip-backed fs.FS: > https://pkg.go.dev/github.com/tgulacsi/go/zipfs. > > The filenames, (missing) directory names in then zip.Reader.File slice gave > me quite substantial bugs, so after using testing/fstest and staring at the > bugs reported, it hit me: > fstest.MapFS is _almost_ the same as what I need. > > Looking into the implementation, that filename/path fiddling, the > synthetization of missing directories is far from simple, so the easiest was > to just copy it as-is. > > Is the included comment enough, and can it be used under Apache-2.0 license, > or should I keep the BSD license for this code? > https://github.com/tgulacsi/go/blob/v0.19.7/zipfs/zipfs.go#L64-L70
The note you included is fine as long as there is a copy of the Go LICENSE file in the LICENSE file in your repo. Enjoy. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUko61LWk0PxjCzOJFQSubV-ic3btWkady8w_ic89eNRQ%40mail.gmail.com.