šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

github.com/samtv12345/cookie

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/samtv12345/cookie

v1.0.0
Source
Go
Version published
Created
Source

This cookie library is a reimplementation of the NodeJS cookie library. It allows parsing but also serializing cookies.

Parsing a cookie with multiple values:

	result := cookie.Parse("foo=bar;fizz  ;  buzz", nil)
	fmt.Println(result) // map[foo:bar fizz:buzz]

Serializing a cookie:

	result, err := Serialize("foo", "bar", nil)

It features the same data structures as the NodeJS library, so you can use it in a similar way. It is also possible to add a custom decoder functions to the parser.

FAQs

Package last updated on 28 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts