Skip to content

Commit 93fde07

Browse files
committed
docs: add readme
1 parent 1025509 commit 93fde07

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cmd/main.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
_ "embed"
5+
"encoding/base64"
56
"encoding/json"
67
"flag"
78
"fmt"
@@ -89,8 +90,12 @@ func main() {
8990
if err != nil {
9091
panic(err)
9192
}
92-
defer resp.Body.Close()
93-
attDocBytes, err = io.ReadAll(resp.Body)
93+
94+
var attDocB64 string
95+
if err := json.NewDecoder(resp.Body).Decode(&attDocB64); err != nil {
96+
panic(err)
97+
}
98+
attDocBytes, err = base64.StdEncoding.DecodeString(attDocB64)
9499
if err != nil {
95100
panic(err)
96101
}

0 commit comments

Comments
 (0)