File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "bytes"
55 "encoding/json"
66 "fmt"
7- "strings"
87 "net/url"
8+ "strings"
9+
910 "github.com/MakeNowJust/heredoc"
1011 "github.com/cli/go-gh/v2/pkg/api"
1112 "github.com/spf13/cobra"
@@ -24,6 +25,7 @@ type createReq struct {
2425}
2526
2627type createResp struct {
28+ AppUrl string `json:"app_url"`
2729}
2830
2931func init () {
@@ -94,14 +96,14 @@ func init() {
9496 fmt .Println (err )
9597 return
9698 }
97- var response string
99+ response := createResp {}
98100 err = client .Put (createUrl , bytes .NewReader (body ), & response )
99101 if err != nil {
100102 fmt .Printf ("Error creating app: %v\n " , err )
101103 return
102104 }
103105
104- fmt .Printf ("App created: %s\n " , response ) // TODO pretty print details
106+ fmt .Printf ("App created: %s\n " , response . AppUrl ) // TODO pretty print details
105107 },
106108 }
107109
You can’t perform that action at this time.
0 commit comments