(req *http.Request)
| 793 | } |
| 794 | |
| 795 | func mustDo(req *http.Request) (*http.Response, []byte) { |
| 796 | resp, err := http.DefaultClient.Do(req) |
| 797 | if err != nil { |
| 798 | panic(err) |
| 799 | } |
| 800 | defer resp.Body.Close() |
| 801 | body, err := io.ReadAll(resp.Body) |
| 802 | if err != nil { |
| 803 | panic(err) |
| 804 | } |
| 805 | return resp, body |
| 806 | } |
| 807 | |
| 808 | func mustGet(urlstr string) (*http.Response, []byte) { |
| 809 | req, err := http.NewRequest("GET", urlstr, nil) |
no test coverage detected