> Since Go is battery included and http is part of its core library, We said batteries, not the kitchen sink.
But seriously, the standard library gives you the components to build these tools yourself. If the Go distro included a http server that just served static files, while this would be perfect for your use case, others who wanted a server that forwarded to FastCGI would be incensed that Go shipped with such a limited tool, and furthermore we refused to improve it. It's better to give you the tools to write exactly the program you want, then you can share it with the world via go get. On Friday, 30 September 2016 12:14:26 UTC+10, Darren Hoo wrote: > > One thing that I really like about python is this one command line to > serve static files: > > python -m SimpleHTTPServer > > > This is very convenient. > > > Now I just want to use Go to do the same thing, I have to copy the snippet > from > > https://github.com/golang/go/wiki/HttpStaticFiles and go run it. > > > Since Go is battery included and http is part of its core library, why > not > > just build it into the Go toolchain, So every time I want to serve static > files, > > I can fire up go like this: > > > go tool http /usr/share/doc > > > go tool http --addr=:8888 /usr/share/doc > > > > > -- 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.