Skip to content

Commit

Permalink
Add attributito the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
josephspurrier committed Jun 12, 2018
1 parent f6a4b67 commit d305dd7
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# h
Advanced Lightweight Go HTTP Handler Adapter

[![Go Report Card](https://goreportcard.com/badge/github.com/josephspurrier/h)](https://goreportcard.com/report/github.com/josephspurrier/h)
[![GoDoc](https://godoc.org/github.com/josephspurrier/h?status.svg)](https://godoc.org/github.com/josephspurrier/h)

## Advanced Lightweight Go HTTP Handler Adapter

Simple to use.

Inspired by [mholt](https://github.com/mholt) and his project,
[caddy](https://github.com/mholt/caddy/wiki/Writing-a-Plugin:-HTTP-Middleware#writing-a-handler).

**h** provides a simple adapter to allow HTTP handler functions to return an int
HTTP status code and an error. This allows you to centralize the handling of
errors in one function.

Even [Andrew Gerrand](https://github.com/adg) uses a variation of this adapter
on the [The Go Blog](https://blog.golang.org/error-handling-and-go).

0 comments on commit d305dd7

Please sign in to comment.