newsbot-portal/internal/handlers/util.go

15 lines
225 B
Go
Raw Normal View History

2024-05-12 10:45:16 -07:00
package handlers
import (
"net/http"
"github.com/labstack/echo/v4"
)
func SetCookie(c echo.Context, key string, value string) {
cookie := new(http.Cookie)
cookie.Name = key
cookie.Value = value
c.SetCookie(cookie)
}