1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
Source: golang-github-protonmail-go-mime
Section: golang
Priority: optional
Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org>
Uploaders: Martin Dosch <martin@mdosch.de>
Rules-Requires-Root: no
Build-Depends: debhelper-compat (= 13),
dh-sequence-golang,
golang-any,
golang-golang-x-text-dev
Testsuite: autopkgtest-pkg-go
Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-protonmail-go-mime
Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-protonmail-go-mime.git
Homepage: https://github.com/ProtonMail/go-mime
XS-Go-Import-Path: github.com/ProtonMail/go-mime
Package: golang-github-protonmail-go-mime-dev
Architecture: all
Multi-Arch: foreign
Depends: golang-golang-x-text-dev,
${misc:Depends}
Description: Go Mime Wrapper Library (library)
Provides a parser for MIME messages
.
The library can be used to extract the body and attachments from a MIME message
Example:
.
printAccepter := gomime.NewMIMEPrinter()
bodyCollector := gomime.NewBodyCollector(printAccepter)
attachmentsCollector := gomime.NewAttachmentsCollector(bodyCollector)
mimeVisitor := gomime.NewMimeVisitor(attachmentsCollector)
err := gomime.VisitAll(bytes.NewReader(mmBodyData), h, mimeVisitor)
attachments := attachmentsCollector.GetAttachments(),
attachmentsHeaders := attachmentsCollector.GetAttHeaders()
bodyContent, bodyMimeType := bodyCollector.GetBody()
|