Skip to content

Instantly share code, notes, and snippets.

View davecb's full-sized avatar

David Collier-Brown davecb

View GitHub Profile
@deankarn
deankarn / response_writer.go
Created April 30, 2015 15:50
Wrapping/implementing golang's http.ResponseWriter example
// LogResponseWritter wraps the standard http.ResponseWritter allowing for more
// verbose logging
type LogResponseWritter struct {
status int
size int
http.ResponseWriter
}
// func NewMyResponseWriter(res http.ResponseWriter) *MyResponseWriter {
// // Default the status code to 200