(ctx context.Context, err *GitHubAPIError)
| 131 | } |
| 132 | |
| 133 | func addGitHubAPIErrorToContext(ctx context.Context, err *GitHubAPIError) (context.Context, error) { |
| 134 | if val, ok := ctx.Value(GitHubErrorKey{}).(*GitHubCtxErrors); ok { |
| 135 | val.api = append(val.api, err) // append the error to the existing slice in the context |
| 136 | return ctx, nil |
| 137 | } |
| 138 | return nil, fmt.Errorf("context does not contain GitHubCtxErrors") |
| 139 | } |
| 140 | |
| 141 | func addGitHubGraphQLErrorToContext(ctx context.Context, err *GitHubGraphQLError) (context.Context, error) { |
| 142 | if val, ok := ctx.Value(GitHubErrorKey{}).(*GitHubCtxErrors); ok { |
no outgoing calls
no test coverage detected