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.