MCPcopy Create free account
hub / github.com/AudDMusic/RedditBot / getJSON

Function getJSON

main.go:175–187  ·  view source on GitHub ↗
(URL string, v interface{})

Source from the content-addressed store, hash-verified

173}
174
175func getJSON(URL string, v interface{}) error {
176 resp, err := http.Get(URL)
177 if err != nil {
178 return err
179 }
180 defer captureFunc(resp.Body.Close)
181 body, err := ioutil.ReadAll(resp.Body)
182 if err != nil {
183 return err
184 }
185 err = json.Unmarshal(body, v)
186 return err
187}
188
189func (r *auddBot) GetLinkFromComment(mention *reddit1.Message, commentsTree []*models.Comment, post *models.Post) (string, error) {
190 // Check:

Callers 1

GetLinkFromCommentMethod · 0.85

Calls 1

captureFuncFunction · 0.85

Tested by

no test coverage detected