Skip to content
This repository was archived by the owner on Aug 24, 2024. It is now read-only.

Commit 15794f8

Browse files
committed
Print out all the release information
1 parent 56bae8b commit 15794f8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

main.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"context"
5+
"encoding/json"
56
"fmt"
67
"log"
78
"os"
@@ -43,11 +44,11 @@ func main() {
4344
if len(rsp3.Releases) != 1 {
4445
log.Fatal("Should have received one response")
4546
}
46-
r := rsp3.Releases[0]
47-
if len(r.VersionCodes) != 1 {
48-
log.Fatal("Should have received only one version code")
49-
}
50-
vc := r.VersionCodes[0]
47+
release := rsp3.Releases[0]
5148

52-
fmt.Println(vc)
49+
json, err := json.MarshalIndent(release, "", " ")
50+
if err != nil {
51+
log.Fatal(err)
52+
}
53+
fmt.Println(string(json))
5354
}

0 commit comments

Comments
 (0)