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.