@Tamás Gulácsi <tgulacs...@gmail.com>

I just wanted to thank you for your advice -- this works wonderfully.

I am still surprised by how Go's type system and thoughtful stdlib design
allows clever ways to override and extend standard behaviours without a lot
of code and complexity!



On Sat, 26 Jan 2019 at 00:46, Tamás Gulácsi <tgulacs...@gmail.com> wrote:

> Something along the lines of https://play.golang.org/p/YgVIP_6uIWG can
> work.
>
> 2019. január 26., szombat 8:36:59 UTC+1 időpontban Tamás Gulácsi a
> következőt írta:
>>
>> dirList is just 20 lines of code, you can easily reimplement it with your
>> decorators.
>>
>> To ake this as an extension of ServeFile, you have to embed ServeFile
>> into your struct, and implement a ServeHTTP method which prints dirs as you
>> wish if the request is a GET of a directory, but call the embedded
>> ServeFile.ServeHTTP otherwise.
>>
> --
> 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.

Reply via email to