1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Broaden an error condition

`http.ErrNoCookie` isn't the only possible error value.
This commit is contained in:
jvoisin 2025-01-20 16:13:31 +01:00 committed by Frédéric Guillot
parent 7967ce4df2
commit 60e1d9e361

View file

@ -8,7 +8,7 @@ import "net/http"
// CookieValue returns the cookie value.
func CookieValue(r *http.Request, name string) string {
cookie, err := r.Cookie(name)
if err == http.ErrNoCookie {
if err != nil {
return ""
}