~dricottone/digestion

ref: ee94f07cfd199e1fd4738e541dae35d3e957ff93 digestion/decoder/quotedprintable.go -rw-r--r-- 402 bytes
ee94f07cDominic Ricottone Updating go version, dependency version, and module name 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package decoder

import (
	"io/ioutil"
	"mime/quotedprintable"
	"strings"
)

func decode_quotedprintable(lines []string) ([]string, error) {
	decoded := []string{}
	for _, line := range lines {
		decoded_line, err := ioutil.ReadAll(quotedprintable.NewReader(strings.NewReader(line)))
		if err != nil {
			return nil, err
		}
		decoded = append(decoded, string(decoded_line))
	}
	return decoded, nil
}