// Browse configures a new Browse middleware instance. func Browse(c *Controller) (middleware.Middleware, error) { configs, err := browseParse(c) if err != nil { return nil, err } browse := browse.Browse{ Configs: configs, IgnoreIndexes: false, } return func(next middleware.Handler) middleware.Handler { browse.Next = next return browse }, nil }
// Browse configures a new Browse middleware instance. func Browse(c *Controller) (middleware.Middleware, error) { configs, err := browseParse(c) if err != nil { return nil, err } browse := browse.Browse{ Root: c.Root, Configs: configs, } return func(next middleware.Handler) middleware.Handler { browse.Next = next return browse }, nil }