15 lines
225 B
Go
15 lines
225 B
Go
|
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)
|
||
|
}
|