mime_go14.go 445 B

1234567891011121314151617181920212223242526
  1. // +build !go1.5
  2. package gomail
  3. import "gopkg.in/alexcesaro/quotedprintable.v3"
  4. var newQPWriter = quotedprintable.NewWriter
  5. type mimeEncoder struct {
  6. quotedprintable.WordEncoder
  7. }
  8. var (
  9. bEncoding = mimeEncoder{quotedprintable.BEncoding}
  10. qEncoding = mimeEncoder{quotedprintable.QEncoding}
  11. lastIndexByte = func(s string, c byte) int {
  12. for i := len(s) - 1; i >= 0; i-- {
  13. if s[i] == c {
  14. return i
  15. }
  16. }
  17. return -1
  18. }
  19. )