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:
> >
> >
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