1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-15 01:34:53 +02:00

Option to options

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-02-18 07:00:51 -08:00
parent 88f307bedd
commit c0873843ad
5 changed files with 15 additions and 15 deletions

View File

@ -8,7 +8,7 @@ import (
)
type (
BasicAuthOption struct {
BasicAuthOptions struct {
}
BasicAuthFunc func(string, string) bool
@ -22,7 +22,7 @@ const (
//
// For valid credentials it calls the next handler.
// For invalid credentials, it sends "401 - Unauthorized" response.
func BasicAuth(fn BasicAuthFunc, option ...*BasicAuthOption) echo.MiddlewareFunc {
func BasicAuth(fn BasicAuthFunc, options ...*BasicAuthOptions) echo.MiddlewareFunc {
return func(h echo.Handler) echo.Handler {
return echo.HandlerFunc(func(c echo.Context) error {
// Skip WebSocket