Skip to content

Use a sentinel error when blocking paths for RepositoriesServices.GetContents - #2837

Merged
gmlewis merged 1 commit into
google:masterfrom
k0ral:sentinel
Jul 21, 2023
Merged

Use a sentinel error when blocking paths for RepositoriesServices.GetContents#2837
gmlewis merged 1 commit into
google:masterfrom
k0ral:sentinel

Conversation

@k0ral

Copy link
Copy Markdown
Contributor

Related to #2805 (comment) .

This allows users to catch this specific error using errors.Is.

…ces.GetContents`
This allows users to catch this specific error using `errors.Is`.
@gmlewisgmlewis changed the title feat: Use a sentinel error when blocking paths for RepositoriesServices.GetContentsUse a sentinel error when blocking paths for RepositoriesServices.GetContentsJul 21, 2023

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @k0ral !
LGTM.
Merging.

@codecov

codecovBot commented Jul 21, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2837 (995c57e) into master (b02bb75) will not change coverage.
The diff coverage is 100.00%.

@@ Coverage Diff @@## master #2837 +/- ##
=======================================
Coverage 98.06% 98.06% =======================================
Files 137 137 Lines 12291 12291 =======================================
Hits 12053 12053 Misses 162 162 Partials 76 76 
Impacted FilesCoverage Δ
github/repos_contents.go87.82% <100.00%> (ø)

@gmlewis
gmlewis merged commit c030d43 into google:masterJul 21, 2023
jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@k0ral@gmlewis