skip

package
v2.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 1 Imported by: 11

README

Skip

Skip middleware for Fiber that skips a wrapped handler is a predicate is true.

Table of Contents
Signatures
func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler
Examples

Import the middleware package that is part of the Fiber web framework

import (
  "github.com/gofiber/fiber/v2"
  "github.com/gofiber/fiber/v2/middleware/skip"
)

After you initiate your Fiber app, you can use the following possibilities:

app.Use(skip.New(handler, func(ctx *fiber.Ctx) bool { return ctx.Method() == fiber.MethodOptions }))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler

New creates a middleware handler which skips the wrapped handler if the exclude predicate returns true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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