Oh, my bad. I've updated the example to properly reference the embedded fs' Open.
https://play.golang.org/p/wbfrElxCsH On Thu, Sep 15, 2016 at 8:09 PM tobyjaguar <tal...@gmail.com> wrote: > Rodrigo, I may need a bit more help with your example. > Can you get me past the Open function, when playing with the example it > seems to get stuck here: > > func (fs filesOnlyFS) Open(name string) (http.File, error) { > f, err := fs.Open(name) > > Is this a recursive call?..doesn't seem to get past this when this > function gets called, and I'm not seeing where it would return the file and > the error. > > thank you > > > On Thursday, September 15, 2016 at 4:40:46 PM UTC-4, tobyjaguar wrote: >> >> Is possible to serve a directory, http.FileServer(http.Dir(".")), without >> listing the directory contents of that directory by navigating one folder >> above it in the browser? >> >> http.Handle("/img/", http.FileServer(http.Dir("static"))) >> >> <img src="/img/image.jpg> is served, but the browser will index >> everything in /img/ >> > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.