~dricottone/digestion

ref: 3f168fd6c4767b4a62a3303fe211045971e43d92 digestion/decoder/base64.go -rw-r--r-- 339 bytes
3f168fd6Dominic Ricottone Added structure for renderers; Tweak on message boundary 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package decoder

import (
	"encoding/base64"
)

func decode_base64(lines []string) ([]string, error) {
	decoded := []string{}
	for _, line := range lines {
		decoded_line, err := base64.StdEncoding.DecodeString(line)
		if err != nil {
			return decoded, err
		}
		decoded = append(decoded, string(decoded_line))
	}
	return decoded, nil
}