cookieutil

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package cookieutil provides small helpers for working with HTTP cookies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterByDomains

func FilterByDomains(cookies []*http.Cookie, domains []string) []*http.Cookie

FilterByDomains returns cookies that match one of the requested domains.

func NormalizeDomains

func NormalizeDomains(domains []string) []string

NormalizeDomains canonicalizes domains for case-insensitive matching.

func SQLiteDomainClause

func SQLiteDomainClause(column string, domains []string) (string, []any)

SQLiteDomainClause returns a WHERE clause fragment and args for exact-or-suffix matching.

func SQLiteWhere

func SQLiteWhere(query, column string, domains []string) (string, []any)

SQLiteWhere appends a WHERE clause to a base query when domains are present.

func SortByExpiry

func SortByExpiry(cookies []*http.Cookie)

SortByExpiry sorts cookies in ascending expiry order while preserving ties.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL