More than magic, it is a global convention. I guess it could be interpreted as: when you access a directory, the web server will index its content and will show you a list of links, if you want to override this behavior, you could create your own index.
See https://github.com/golang/go/blob/b68624464dc41ffb09b9ee5314d3455904acd2a8/src/net/http/fs.go#L543 -- 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.