Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jhillyerd/enmime
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.10.1
Choose a base ref
...
head repository: jhillyerd/enmime
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.11.0
Choose a head ref
  • 13 commits
  • 40 files changed
  • 6 contributors

Commits on Nov 28, 2022

  1. feat: parse DSN (#268)

    * feat: parse DSN
    * feat(dsn): add example
    
    Co-authored-by: Dmytro Kasianenko <dmytro.kasianeneko@outreach.io>
    dmytrokasianenko-outreach and Dmytro Kasianenko authored Nov 28, 2022
    Copy the full SHA
    04d6a5b View commit details

Commits on Jan 30, 2023

  1. Use Go 1.20 from nixpkgs-unstable for dev shell (#271)

    Signed-off-by: James Hillyerd <james@hillyerd.com>
    jhillyerd authored Jan 30, 2023
    Copy the full SHA
    08f8a14 View commit details

Commits on Jan 31, 2023

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    MikeGoldsmith Mike Goldsmith
    Copy the full SHA
    c5103b3 View commit details

Commits on Feb 2, 2023

  1. fix: Reject invalid MIME header name characters to support Go 1.20 (#270

    )
    
    * Test with go 1.20 release candidate
    * header: Detect invalid header name characters for Go 1.20
    * header: test for permitted special chars
    jhillyerd authored Feb 2, 2023
    Copy the full SHA
    415ff72 View commit details
  2. Copy the full SHA
    3cc8cfb View commit details
  3. Update golangci-lint to 1.51.0 (#265)

    * Update golangci-lint to 1.51.0
    
    * maint: fix envelope.go lint warning
    jhillyerd authored Feb 2, 2023
    Copy the full SHA
    95601a3 View commit details

Commits on Feb 3, 2023

  1. Copy the full SHA
    33640c3 View commit details

Commits on Feb 4, 2023

  1. Copy the full SHA
    7c7bb37 View commit details

Commits on Feb 10, 2023

  1. feature: control randomness of boundary headers (#276)

    Adds a RandSeed func to mail builder, allowing for reproducible output.
    xoba authored Feb 10, 2023
    Copy the full SHA
    2161503 View commit details

Commits on Feb 12, 2023

  1. feat: export DecodeRFC2047 (#277) (#278)

    Exports coding.RFC2047Decode(), making the large set of charsets more
    readily available for package users.
    usedbytes authored Feb 12, 2023
    Copy the full SHA
    ca81e6f View commit details

Commits on Feb 15, 2023

  1. Add direnv nix flake config (#279)

    Signed-off-by: James Hillyerd <james@hillyerd.com>
    jhillyerd authored Feb 15, 2023
    Copy the full SHA
    65ae7bc View commit details
  2. Refactor a couple parts of the boundary random sourcing (#280)

    Signed-off-by: James Hillyerd <james@hillyerd.com>
    jhillyerd authored Feb 15, 2023
    Copy the full SHA
    ba69e72 View commit details

Commits on Feb 23, 2023

  1. build(deps): bump golang.org/x/text from 0.3.6 to 0.3.8 (#281)

    Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.6 to 0.3.8.
    - [Release notes](https://github.com/golang/text/releases)
    - [Commits](golang/text@v0.3.6...v0.3.8)
    
    ---
    updated-dependencies:
    - dependency-name: golang.org/x/text
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 23, 2023
    Copy the full SHA
    564f418 View commit details
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -8,15 +8,15 @@ jobs:
matrix:
go:
- 1.16.x
- 1.17.x
- 1.18.x
- 1.19.x
- 1.20.x
name: Go ${{ matrix.go }} build
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Build and Test
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
version: v1.51.0
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -27,5 +27,7 @@ _testmain.go
# vim swp files
*.swp

/.direnv

cmd/mime-dump/mime-dump
cmd/mime-extractor/mime-extractor
302 changes: 0 additions & 302 deletions CHANGELOG.md

This file was deleted.

42 changes: 21 additions & 21 deletions boundary.go
Original file line number Diff line number Diff line change
@@ -44,31 +44,31 @@ func newBoundaryReader(reader *bufio.Reader, boundary string) *boundaryReader {

// Read returns a buffer containing the content up until boundary
//
// Excerpt from io package on io.Reader implementations:
// Excerpt from io package on io.Reader implementations:
//
// type Reader interface {
// Read(p []byte) (n int, err error)
// }
// type Reader interface {
// Read(p []byte) (n int, err error)
// }
//
// Read reads up to len(p) bytes into p. It returns the number of
// bytes read (0 <= n <= len(p)) and any error encountered. Even
// if Read returns n < len(p), it may use all of p as scratch space
// during the call. If some data is available but not len(p) bytes,
// Read conventionally returns what is available instead of waiting
// for more.
// Read reads up to len(p) bytes into p. It returns the number of
// bytes read (0 <= n <= len(p)) and any error encountered. Even
// if Read returns n < len(p), it may use all of p as scratch space
// during the call. If some data is available but not len(p) bytes,
// Read conventionally returns what is available instead of waiting
// for more.
//
// When Read encounters an error or end-of-file condition after
// successfully reading n > 0 bytes, it returns the number of bytes
// read. It may return the (non-nil) error from the same call or
// return the error (and n == 0) from a subsequent call. An instance
// of this general case is that a Reader returning a non-zero number
// of bytes at the end of the input stream may return either err == EOF
// or err == nil. The next Read should return 0, EOF.
// When Read encounters an error or end-of-file condition after
// successfully reading n > 0 bytes, it returns the number of bytes
// read. It may return the (non-nil) error from the same call or
// return the error (and n == 0) from a subsequent call. An instance
// of this general case is that a Reader returning a non-zero number
// of bytes at the end of the input stream may return either err == EOF
// or err == nil. The next Read should return 0, EOF.
//
// Callers should always process the n > 0 bytes returned before
// considering the error err. Doing so correctly handles I/O errors
// that happen after reading some bytes and also both of the allowed
// EOF behaviors.
// Callers should always process the n > 0 bytes returned before
// considering the error err. Doing so correctly handles I/O errors
// that happen after reading some bytes and also both of the allowed
// EOF behaviors.
func (b *boundaryReader) Read(dest []byte) (n int, err error) {
if b.buffer.Len() >= len(dest) {
// This read request can be satisfied entirely by the buffer.
Loading