tijl.dev-core/internal/utils/cookie.go

16 lines
217 B
Go
Raw Permalink Normal View History

2024-08-26 14:22:24 +02:00
package utils
import (
"time"
"github.com/gofiber/fiber/v2"
)
func ClearCookie(c *fiber.Ctx, key string) {
c.Cookie(&fiber.Cookie{
Name: key,
Value: "",
Expires: time.Now().Add(-1 * time.Hour),
})
}