util

package
v1.0.1-0...-3a959c6 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateParents

func CreateParents(file string)

CreateParents creates all parent directories

func FileExists

func FileExists(file string) bool

FileExists checks if the file exists

func ServeError

func ServeError(rw http.ResponseWriter, r *http.Request, err error)

Types

type Logger

type Logger struct {
	// ALogger implements just enough log.Logger interface to be compatible with other implementations
	negroni.ALogger
	// contains filtered or unexported fields
}

Logger is a middleware handler that logs the request as it goes in and the response as it goes out.

func NewLogger

func NewLogger() *Logger

NewLogger returns a new Logger instance

func (*Logger) ServeHTTP

func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

func (*Logger) SetDateFormat

func (l *Logger) SetDateFormat(format string)

func (*Logger) SetFormat

func (l *Logger) SetFormat(format string)

Jump to

Keyboard shortcuts

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