Version: v1.7.1-0...-29a0ac7 Latest Latest

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

Go to latest
Published: Apr 4, 2016 License: Apache-2.0 Imports: 8 Imported by: 0




This section is empty.


View Source
var Root string


func Static

func Static(directory string, staticOpt ...StaticOptions) macaron.Handler

Static returns a middleware handler that serves static files in the given directory.

func Statics

func Statics(opt StaticOptions, dirs ...string) macaron.Handler

Statics registers multiple static middleware handlers all at once.


type StaticOptions

type StaticOptions struct {
	// Prefix is the optional prefix used to serve the static directory content
	Prefix string
	// SkipLogging will disable [Static] log messages when a static file is served.
	SkipLogging bool
	// IndexFile defines which file to serve as index if it exists.
	IndexFile string
	// Expires defines which user-defined function to use for producing a HTTP Expires Header
	AddHeaders func(ctx *macaron.Context)
	// FileSystem is the interface for supporting any implmentation of file system.
	FileSystem http.FileSystem

StaticOptions is a struct for specifying configuration options for the macaron.Static middleware.

Source Files

Jump to

Keyboard shortcuts

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