We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f034f2 commit d4f95a9Copy full SHA for d4f95a9
transform/encode.go
@@ -96,14 +96,16 @@ func EncodeBase64Chunks(s string, maxChunkSize uint) []string {
96
for {
97
if maxSize(chunkSize) >= int(maxChunkSize) {
98
chunkSize--
99
+
100
break
101
}
102
chunkSize++
103
- var chunks []string
104
+ chunks := []string{}
105
for c := range slices.Chunk([]byte(s), chunkSize) {
- chunks = append(chunks, base64.StdEncoding.EncodeToString([]byte(c)))
106
+ chunks = append(chunks, base64.StdEncoding.EncodeToString(c))
107
108
109
return chunks
110
111
0 commit comments