Open bsmartt13 opened 8 years ago
its better for arbitrary stream decodes
if v != nil { if w, ok := v.(io.Writer); ok { io.Copy(w, resp.Body) } else { err = json.NewDecoder(resp.Body).Decode(v) } }
its better for arbitrary stream decodes