File tree 39 files changed +62
-62
lines changed
39 files changed +62
-62
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import (
13
13
"reflect"
14
14
"time"
15
15
16
- "github.com/jhillyerd/enmime/internal/stringutil"
16
+ "github.com/jhillyerd/enmime/v2/ internal/stringutil"
17
17
)
18
18
19
19
// MailBuilder facilitates the easy construction of a MIME message. Each manipulation method
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import (
10
10
"testing"
11
11
"time"
12
12
13
- "github.com/jhillyerd/enmime"
14
- "github.com/jhillyerd/enmime/internal/test"
13
+ "github.com/jhillyerd/enmime/v2 "
14
+ "github.com/jhillyerd/enmime/v2/ internal/test"
15
15
"github.com/stretchr/testify/assert"
16
16
"github.com/stretchr/testify/require"
17
17
)
Original file line number Diff line number Diff line change 5
5
"os"
6
6
"strings"
7
7
8
- "github.com/jhillyerd/enmime"
9
- "github.com/jhillyerd/enmime/cmd"
8
+ "github.com/jhillyerd/enmime/v2 "
9
+ "github.com/jhillyerd/enmime/v2/ cmd"
10
10
)
11
11
12
12
func Example () {
Original file line number Diff line number Diff line change 7
7
"os"
8
8
"path/filepath"
9
9
10
- "github.com/jhillyerd/enmime"
11
- "github.com/jhillyerd/enmime/cmd"
10
+ "github.com/jhillyerd/enmime/v2 "
11
+ "github.com/jhillyerd/enmime/v2/ cmd"
12
12
)
13
13
14
14
type dumper struct {
Original file line number Diff line number Diff line change 8
8
"os"
9
9
"path/filepath"
10
10
11
- "github.com/jhillyerd/enmime"
12
- "github.com/jhillyerd/enmime/cmd"
11
+ "github.com/jhillyerd/enmime/v2 "
12
+ "github.com/jhillyerd/enmime/v2/ cmd"
13
13
)
14
14
15
15
var (
Original file line number Diff line number Diff line change 8
8
"sort"
9
9
"strings"
10
10
11
- "github.com/jhillyerd/enmime"
11
+ "github.com/jhillyerd/enmime/v2 "
12
12
)
13
13
14
14
// AddressHeaders enumerates SMTP headers that contain email addresses
Original file line number Diff line number Diff line change 5
5
"bytes"
6
6
"testing"
7
7
8
- "github.com/jhillyerd/enmime"
8
+ "github.com/jhillyerd/enmime/v2 "
9
9
)
10
10
11
11
func TestMarkdownH1 (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package enmime
3
3
import (
4
4
"strings"
5
5
6
- inttp "github.com/jhillyerd/enmime/internal/textproto"
6
+ inttp "github.com/jhillyerd/enmime/v2/ internal/textproto"
7
7
)
8
8
9
9
// detectMultipartMessage returns true if the message has a recognized multipart Content-Type header
Original file line number Diff line number Diff line change 5
5
"path/filepath"
6
6
"testing"
7
7
8
- "github.com/jhillyerd/enmime/internal/textproto"
8
+ "github.com/jhillyerd/enmime/v2/ internal/textproto"
9
9
)
10
10
11
11
func TestDetectSinglePart (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ package dsn
5
5
import (
6
6
"strings"
7
7
8
- "github.com/jhillyerd/enmime/internal/textproto"
8
+ "github.com/jhillyerd/enmime/v2/ internal/textproto"
9
9
)
10
10
11
11
// Report represents delivery status report as per https://datatracker.ietf.org/doc/html/rfc6522.
Original file line number Diff line number Diff line change 4
4
"fmt"
5
5
"os"
6
6
7
- "github.com/jhillyerd/enmime"
8
- "github.com/jhillyerd/enmime/dsn"
7
+ "github.com/jhillyerd/enmime/v2 "
8
+ "github.com/jhillyerd/enmime/v2/ dsn"
9
9
)
10
10
11
11
// ExampleParseReport shows how to parse message as Delivery Status Notification (DSN).
Original file line number Diff line number Diff line change 7
7
"fmt"
8
8
"io"
9
9
10
- "github.com/jhillyerd/enmime"
11
- "github.com/jhillyerd/enmime/internal/textproto"
10
+ "github.com/jhillyerd/enmime/v2 "
11
+ "github.com/jhillyerd/enmime/v2/ internal/textproto"
12
12
)
13
13
14
14
// ParseReport parses p as a "container" for delivery status report (per rfc6522) if p is "multipart/report".
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ package dsn
3
3
import (
4
4
"testing"
5
5
6
- "github.com/jhillyerd/enmime"
7
- "github.com/jhillyerd/enmime/internal/textproto"
6
+ "github.com/jhillyerd/enmime/v2 "
7
+ "github.com/jhillyerd/enmime/v2/ internal/textproto"
8
8
9
9
"github.com/stretchr/testify/assert"
10
10
)
Original file line number Diff line number Diff line change 6
6
"path/filepath"
7
7
"testing"
8
8
9
- "github.com/jhillyerd/enmime"
10
- "github.com/jhillyerd/enmime/dsn"
11
- "github.com/jhillyerd/enmime/internal/textproto"
9
+ "github.com/jhillyerd/enmime/v2 "
10
+ "github.com/jhillyerd/enmime/v2/ dsn"
11
+ "github.com/jhillyerd/enmime/v2/ internal/textproto"
12
12
13
13
"github.com/stretchr/testify/assert"
14
14
"github.com/stretchr/testify/require"
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import (
11
11
"strings"
12
12
"time"
13
13
14
- "github.com/jhillyerd/enmime/internal/coding"
15
- "github.com/jhillyerd/enmime/internal/stringutil"
14
+ "github.com/jhillyerd/enmime/v2/ internal/coding"
15
+ "github.com/jhillyerd/enmime/v2/ internal/stringutil"
16
16
)
17
17
18
18
// b64Percent determines the percent of non-ASCII characters enmime will tolerate before switching
Original file line number Diff line number Diff line change 7
7
"testing"
8
8
"time"
9
9
10
- "github.com/jhillyerd/enmime"
11
- "github.com/jhillyerd/enmime/internal/test"
10
+ "github.com/jhillyerd/enmime/v2 "
11
+ "github.com/jhillyerd/enmime/v2/ internal/test"
12
12
)
13
13
14
14
func TestEncodePartEmpty (t * testing.T ) {
Original file line number Diff line number Diff line change 51
51
// multi-gigabyte attachments.
52
52
//
53
53
// enmime is open source software released under the MIT License. The latest version can be found
54
- // at https://github.com/jhillyerd/enmime
54
+ // at https://github.com/jhillyerd/enmime/v2
55
55
//
56
56
// [1]: https://github.com/jaytaylor/html2text
57
- package enmime // import "github.com/jhillyerd/enmime"
57
+ package enmime // import "github.com/jhillyerd/enmime/v2 "
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import (
10
10
"time"
11
11
12
12
"github.com/jaytaylor/html2text"
13
- "github.com/jhillyerd/enmime/internal/coding"
14
- inttp "github.com/jhillyerd/enmime/internal/textproto"
13
+ "github.com/jhillyerd/enmime/v2/ internal/coding"
14
+ inttp "github.com/jhillyerd/enmime/v2/ internal/textproto"
15
15
"github.com/pkg/errors"
16
16
)
17
17
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import (
10
10
"time"
11
11
12
12
"github.com/go-test/deep"
13
- "github.com/jhillyerd/enmime"
14
- "github.com/jhillyerd/enmime/internal/test"
13
+ "github.com/jhillyerd/enmime/v2 "
14
+ "github.com/jhillyerd/enmime/v2/ internal/test"
15
15
)
16
16
17
17
func TestParseHeaderOnly (t * testing.T ) {
Original file line number Diff line number Diff line change 8
8
"strings"
9
9
"time"
10
10
11
- "github.com/jhillyerd/enmime"
11
+ "github.com/jhillyerd/enmime/v2 "
12
12
)
13
13
14
14
// ExampleBuilder illustrates how to build and send a MIME encoded message.
Original file line number Diff line number Diff line change 1
- module github.com/jhillyerd/enmime
1
+ module github.com/jhillyerd/enmime/v2
2
2
3
3
go 1.20
4
4
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ import (
9
9
"net/textproto"
10
10
"strings"
11
11
12
- "github.com/jhillyerd/enmime/internal/coding"
13
- "github.com/jhillyerd/enmime/internal/stringutil"
14
- inttp "github.com/jhillyerd/enmime/internal/textproto"
15
- "github.com/jhillyerd/enmime/mediatype"
12
+ "github.com/jhillyerd/enmime/v2/ internal/coding"
13
+ "github.com/jhillyerd/enmime/v2/ internal/stringutil"
14
+ inttp "github.com/jhillyerd/enmime/v2/ internal/textproto"
15
+ "github.com/jhillyerd/enmime/v2/ mediatype"
16
16
17
17
"github.com/pkg/errors"
18
18
)
Original file line number Diff line number Diff line change 6
6
"strings"
7
7
"testing"
8
8
9
- "github.com/jhillyerd/enmime/internal/textproto"
9
+ "github.com/jhillyerd/enmime/v2/ internal/textproto"
10
10
)
11
11
12
12
// Test re-encoding to base64
Original file line number Diff line number Diff line change 5
5
"bytes"
6
6
"io"
7
7
8
- "github.com/jhillyerd/enmime/internal/coding"
9
- "github.com/jhillyerd/enmime/internal/textproto"
8
+ "github.com/jhillyerd/enmime/v2/ internal/coding"
9
+ "github.com/jhillyerd/enmime/v2/ internal/textproto"
10
10
11
11
"github.com/pkg/errors"
12
12
)
Original file line number Diff line number Diff line change 8
8
"strings"
9
9
"testing"
10
10
11
- "github.com/jhillyerd/enmime"
12
- "github.com/jhillyerd/enmime/internal/test"
11
+ "github.com/jhillyerd/enmime/v2 "
12
+ "github.com/jhillyerd/enmime/v2/ internal/test"
13
13
)
14
14
15
15
func TestDecodeRFC2047 (t * testing.T ) {
Original file line number Diff line number Diff line change 5
5
"strings"
6
6
"testing"
7
7
8
- "github.com/jhillyerd/enmime/internal/coding"
8
+ "github.com/jhillyerd/enmime/v2/ internal/coding"
9
9
)
10
10
11
11
func TestBase64Cleaner (t * testing.T ) {
Original file line number Diff line number Diff line change 6
6
"strings"
7
7
"testing"
8
8
9
- "github.com/jhillyerd/enmime/internal/coding"
9
+ "github.com/jhillyerd/enmime/v2/ internal/coding"
10
10
)
11
11
12
12
// Test an invalid character set with the CharsetReader
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package coding_test
3
3
import (
4
4
"testing"
5
5
6
- "github.com/jhillyerd/enmime/internal/coding"
6
+ "github.com/jhillyerd/enmime/v2/ internal/coding"
7
7
)
8
8
9
9
func TestFromIDHeader (t * testing.T ) {
Original file line number Diff line number Diff line change 8
8
"strings"
9
9
"testing"
10
10
11
- "github.com/jhillyerd/enmime/internal/coding"
11
+ "github.com/jhillyerd/enmime/v2/ internal/coding"
12
12
)
13
13
14
14
func TestQPCleaner (t * testing.T ) {
Original file line number Diff line number Diff line change 4
4
"net/mail"
5
5
"testing"
6
6
7
- "github.com/jhillyerd/enmime/internal/stringutil"
7
+ "github.com/jhillyerd/enmime/v2/ internal/stringutil"
8
8
)
9
9
10
10
func TestJoinAddressEmpty (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package stringutil_test
3
3
import (
4
4
"testing"
5
5
6
- "github.com/jhillyerd/enmime/internal/stringutil"
6
+ "github.com/jhillyerd/enmime/v2/ internal/stringutil"
7
7
"github.com/stretchr/testify/assert"
8
8
)
9
9
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package stringutil_test
3
3
import (
4
4
"testing"
5
5
6
- "github.com/jhillyerd/enmime/internal/stringutil"
6
+ "github.com/jhillyerd/enmime/v2/ internal/stringutil"
7
7
)
8
8
9
9
func TestWrapEmpty (t * testing.T ) {
Original file line number Diff line number Diff line change 8
8
"strings"
9
9
"testing"
10
10
11
- "github.com/jhillyerd/enmime"
11
+ "github.com/jhillyerd/enmime/v2 "
12
12
)
13
13
14
14
// PartExists indicates to ComparePart that this part is expect to exist
Original file line number Diff line number Diff line change 5
5
"path/filepath"
6
6
"testing"
7
7
8
- "github.com/jhillyerd/enmime"
8
+ "github.com/jhillyerd/enmime/v2 "
9
9
)
10
10
11
11
func TestHelperComparePartsEqual (t * testing.T ) {
Original file line number Diff line number Diff line change 6
6
"strings"
7
7
_utf8 "unicode/utf8"
8
8
9
- "github.com/jhillyerd/enmime/internal/coding"
10
- "github.com/jhillyerd/enmime/internal/stringutil"
9
+ "github.com/jhillyerd/enmime/v2/ internal/coding"
10
+ "github.com/jhillyerd/enmime/v2/ internal/stringutil"
11
11
"github.com/pkg/errors"
12
12
)
13
13
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ import (
13
13
"time"
14
14
15
15
"github.com/gogs/chardet"
16
- "github.com/jhillyerd/enmime/internal/coding"
17
- inttp "github.com/jhillyerd/enmime/internal/textproto"
18
- "github.com/jhillyerd/enmime/mediatype"
16
+ "github.com/jhillyerd/enmime/v2/ internal/coding"
17
+ inttp "github.com/jhillyerd/enmime/v2/ internal/textproto"
18
+ "github.com/jhillyerd/enmime/v2/ mediatype"
19
19
"github.com/pkg/errors"
20
20
)
21
21
Original file line number Diff line number Diff line change 4
4
"strings"
5
5
"testing"
6
6
7
- "github.com/jhillyerd/enmime"
8
- "github.com/jhillyerd/enmime/internal/test"
7
+ "github.com/jhillyerd/enmime/v2 "
8
+ "github.com/jhillyerd/enmime/v2/ internal/test"
9
9
)
10
10
11
11
func TestPlainTextPart (t * testing.T ) {
Original file line number Diff line number Diff line change 6
6
"testing"
7
7
"time"
8
8
9
- "github.com/jhillyerd/enmime"
9
+ "github.com/jhillyerd/enmime/v2 "
10
10
"github.com/stretchr/testify/assert"
11
11
)
12
12
Original file line number Diff line number Diff line change 5
5
"strings"
6
6
"testing"
7
7
8
- "github.com/jhillyerd/enmime"
8
+ "github.com/jhillyerd/enmime/v2 "
9
9
)
10
10
11
11
func TestSMTPSend (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments