As an example: is testdata outside the package's module? Thanks Manlio Il giorno sabato 16 gennaio 2021 alle 21:02:25 UTC+1 Manlio Perillo ha scritto:
> Thanks. I was only considering the parent of the module's root directory. > Is the concept of "outside the module" defined somewhere? > > Manlio Perillo > > Il giorno sabato 16 gennaio 2021 alle 19:30:05 UTC+1 > axel.wa...@googlemail.com ha scritto: > >> To put it another way: >> >> The second phrase is a lexical requirement about the pattern. It must not >> contain a . or .. element - whether or not the result is included in the >> module (e.g. "foo/../foo/bar" is not allowed either, even though it's >> equivalent to "foo/bar"). >> >> But, a lexical path *in* the module might still refer to a file not >> included in it it - either by a symlink, or by being in the .git directory >> (and maybe other cases I'm unaware of). So, the first phrase excludes any >> case where the file is not included the module, whether or not the name you >> refer it by lexically contains . or '..'. >> >> Both phrases are necessary. >> >> On Sat, Jan 16, 2021 at 7:24 PM Axel Wagner <axel.wa...@googlemail.com> >> wrote: >> >>> I don't think they do. There are two examples in the first phrase, which >>> are not excluded by the second - the ".git" directory and a symbolic link >>> (pointing outside of the module). >>> >>> On Sat, Jan 16, 2021 at 7:11 PM Manlio Perillo <manlio....@gmail.com> >>> wrote: >>> >>>> I'm reading the https://tip.golang.org/pkg/embed/ package >>>> documentation and I found a possible inconsistency. >>>> >>>> At the end of https://tip.golang.org/pkg/embed/#hdr-Directives: >>>> "Patterns must not match files outside the package's module, such as >>>> ‘.git/*’ or symbolic links" >>>> and >>>> "Patterns must not contain ‘.’ or ‘..’ path elements nor begin with a >>>> leading slash" >>>> >>>> It seems to me that the first phrase is not necessary, since the second >>>> phrase prevents matching files outside the package module. >>>> >>>> >>>> Thanks >>>> Manlio Perillo >>>> >>>> -- >>>> 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...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/golang-nuts/5e1d688e-cdb4-4b32-a06a-086a6b097064n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/golang-nuts/5e1d688e-cdb4-4b32-a06a-086a6b097064n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- 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/7338bb0c-7713-41f6-ba6d-6e14bf1dcd1dn%40googlegroups.com.