middleware

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStatic

func NewStatic(opts StaticOptions) gear.Middleware

NewStatic returns a Static middleware to serves static content from the provided root directory.

Types

type StaticOptions

type StaticOptions struct {
	Root        string // The directory you wish to serve
	Prefix      string // The url prefix you wish to serve as static request, default to `'/'`.
	StripPrefix bool   // Strip the prefix from URL path, default to `false`.
}

StaticOptions is static middleware options

Jump to

Keyboard shortcuts

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