cookiemonster

package module
v0.0.0-...-1584578 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 8 Imported by: 38 modules, 38 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

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)
}

Documentation

Overview

Package cookiemonster provides methods for parsing Netscape format cookie files into slices of http.Cookie

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(r io.Reader) ([]*http.Cookie, error)

Parse will parse r and will return a slice of *http.Cookie or an error

func ParseFile

func ParseFile(path string) ([]*http.Cookie, error)

ParseFile parses the file located at path and will return a slice of *http.Cookie or an error

func ParseString

func ParseString(s string) ([]*http.Cookie, error)

ParseString parses s and will return a slice of *http.Cookie or an error

Types

This section is empty.

Jump to

Keyboard shortcuts

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