Skip to content

Commit

Permalink
doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mlctrez committed May 3, 2016
1 parent 054fd62 commit dc60bff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router_setup.go
Expand Up @@ -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.")
Expand Down
3 changes: 3 additions & 0 deletions static_middleware.go
Expand Up @@ -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
Expand Down

0 comments on commit dc60bff

Please sign in to comment.