(resp *http.Response)
| 114 | } |
| 115 | |
| 116 | func statusCodeError(resp *http.Response) error { |
| 117 | if resp.Header.Get("X-Go-Pprof") != "" && strings.Contains(resp.Header.Get("Content-Type"), "text/plain") { |
| 118 | // error is from pprof endpoint |
| 119 | if body, err := io.ReadAll(resp.Body); err == nil { |
| 120 | return fmt.Errorf("server response: %s - %s", resp.Status, body) |
| 121 | } |
| 122 | } |
| 123 | return fmt.Errorf("server response: %s", resp.Status) |
| 124 | } |
| 125 | |
| 126 | // doLocalSymbolize adds symbol and line number information to all locations |
| 127 | // in a profile. mode enables some options to control |
no outgoing calls
no test coverage detected
searching dependent graphs…