/CookieMonster

A Go library to parse Netscape HTTP cookie format files

Primary LanguageGoMIT LicenseMIT

CookieMonster

GoDoc Build Status

A simple package for parsing Netscape Cookie File formatted cookies into Go Cookies

Install

go get -u github.com/MercuryEngineering/CookieMonster

Example

import (
  "fmt"
  "github.com/MercuryEngineering/CookieMonster"
)

cookies, err := cookiemonster.ParseFile("cookies.txt")
if err != nil {
  panic(err)
}

for _, cookie := range cookies {
  fmt.Printf("%s=%s\n", cookie.Name, cookie.Value)
}