Cleanup and improvements

Package remux goes away in favour of urlparser. No need to have regex
based mux anymore since there are many other and better implementations
out there.

The urlparser is a simple mapper of variable arguments in the URL to a
string map.

Old unusable templates go away as well. Copyrights are updated and a new
AUTHORS file is instroduced.
136 files changed
tree: 32d83070f0bce9e0c82545ed544044ac24ba2c5e
  1. autogzip/
  2. examples/
  3. httpxtra/
  4. sse/
  5. urlparams/
  6. .gitignore
  7. AUTHORS
  8. LICENSE
  9. README.md
README.md

go-web

go-web is a collection of utilities for http servers written in Go.

It has the following packages:

autogzip

  • http.Handler that supports on-the-fly gzip encoding
  • dummy http client that supports automatic gzip decoding

httpxtra

  • Servers can listen on both TCP or Unix sockets
  • Essential request logging (including Apache Common format)
  • Support for X-Real-IP and X-Forwarded-For headers for servers sitting behind proxies or load balancers

remux

  • A very simple request multiplexer that supports regular expressions

sse

  • Server-Sent Events library (for push notifications)

Examples and application templates

Check out the examples directory.

There are application templates in the templates directory that can be used as a starting point for new projects. Check them out too.

Resources

freegeoip.net is a public API for IP geolocation that uses go-web, and is open source too.

There's a live version of the SSE demo here: http://cos.pe