(body io.Closer, context string)
| 902 | } |
| 903 | |
| 904 | func closeResponseBody(body io.Closer, context string) error { |
| 905 | if body == nil { |
| 906 | return nil |
| 907 | } |
| 908 | if err := body.Close(); err != nil { |
| 909 | return fmt.Errorf("github: close %s: %w", context, err) |
| 910 | } |
| 911 | return nil |
| 912 | } |
| 913 | |
| 914 | func joinErrors(errs ...error) error { |
| 915 | filtered := make([]error, 0, len(errs)) |