logger

package
Version: v0.0.0-...-71a9ee9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	Log     *log.Logger
	IPField string // `long:"logger_realip_field" default:"real-ip" description:"Context field for Real ip"`
}

Middleware is a struct that has a ServeHTTP method

func New

func New(logger *log.Logger, field string) *Middleware

func (*Middleware) ServeHTTP

func (mw *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

The middleware handler

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL