16 lines
217 B
Go
16 lines
217 B
Go
|
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),
|
||
|
})
|
||
|
}
|