Re: [go-nuts] Re: Does go:embed embed.FS embeds directories or possible confusion with how it works

2023-01-24 Thread Shammi Shailaj
Thanks Ian. changing it to *http.Handle("/static/", http.FileServer(http.FS(fs.Sub(static,"files"* did work. On Tuesday, 24 January 2023 at 01:52:40 UTC+5:30 Ian Lance Taylor wrote: > On Mon, Jan 23, 2023 at 11:51 AM Shammi Shailaj > wrote: > > > >

[go-nuts] Re: Does go:embed embed.FS embeds directories or possible confusion with how it works

2023-01-23 Thread Shammi Shailaj
There is no function named *Sub()* for the variable *static* of type *embed.FS.* Hence, the handler: *http.Handle("/static/", http.FileServer(http.FS(static. Sub("files"* shall not work and throw an error like: *static.Sub undefined (type embed.FS has no field or method Sub)* Can anyone pr