Skip to content

Package mbox parses the mbox file format into messages and formats messages into mbox files

License

Notifications You must be signed in to change notification settings

emersion/go-mbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mbox

Build Status GoDoc

Package mbox parses the mbox file format into messages and formats messages into mbox files.

Documentation

Please refer to GoDoc for the API documentation.

Notes

This package does not provide advanced mbox manipulation functionalities, like deleting, searching, etc.

If you get a bufio.Scanner: token too long error, you need to increase the buffer size of the scanner. To double the buffer size you'd do something like this:

s := mbox.NewScanner(...)

bufsize := 2*bufio.MaxScanTokenSize
buf := make([]byte, bufsize)
s.Buffer(buf, bufsize)

Maintainers Note

This project is in maintenance mode. I am not actively working on this package any more, but I am responding to issues and merge the occasional pull request. If you miss any functionality, feel free to send pull requests.

If you are interested in taking over this package, ping me.

Alternatives

  • github.com/sam-falvo/mbox
  • github.com/bthomson/mbox

Both packages provide ways to parse the mbox file format. After looking at the code of both packages I decided to roll my own variant, leveraging the standard library as much as possible. This implementation basically boils down to one well tested split function for bufio.Scanner.

About

Package mbox parses the mbox file format into messages and formats messages into mbox files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages