From dc60bff758f1c9ef79c197acc329bdc05e5cdc4d Mon Sep 17 00:00:00 2001 From: mlctrez Date: Tue, 3 May 2016 14:08:14 -0500 Subject: [PATCH] doc fixes --- router_setup.go | 4 ++-- static_middleware.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/router_setup.go b/router_setup.go index 2d4d872..c248dfb 100644 --- a/router_setup.go +++ b/router_setup.go @@ -171,8 +171,8 @@ func (r *Router) NotFound(fn interface{}) *Router { return r } -// NotFound sets the specified function as the not-found handler (when no route matches) and returns the router. -// Note that only the root router can have a NotFound handler. +// OptionsHandler sets the specified function as the options handler and returns the router. +// Note that only the root router can have a OptionsHandler handler. func (r *Router) OptionsHandler(fn interface{}) *Router { if r.parent != nil { panic("You can only set an OptionsHandler on the root router.") diff --git a/static_middleware.go b/static_middleware.go index 3633585..4d793eb 100644 --- a/static_middleware.go +++ b/static_middleware.go @@ -6,6 +6,9 @@ import ( "strings" ) +// StaticOption configures how StaticMiddlewareDir handles url paths and index files for directories. +// If set, Prefix is removed from the start of the url path before attempting to serve a directory or file. +// If set, IndexFile is the index file to serve when the url path maps to a directory. type StaticOption struct { Prefix string IndexFile string