common

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package common Note: inspiration for this from https://gist.github.com/cespare/3985516

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error, level int)

CheckError 0 = info 1 = warning 2 = error - should be most common 3 = fatal

func LogAccess

func LogAccess(w http.ResponseWriter, req *http.Request, duration time.Duration)

Types

type ErrorHandler

type ErrorHandler func(http.ResponseWriter, *http.Request) error

func (ErrorHandler) ServeHTTP

func (fn ErrorHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL