Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make MatchDirectories clearer #15

Merged
merged 3 commits into from
Feb 3, 2021
Merged

feat: make MatchDirectories clearer #15

merged 3 commits into from
Feb 3, 2021

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Feb 2, 2021

setting a bool is a bit weird, and I never know what the behavior will be without reading the godoc.

I propose splitting that option into 2 new options, which hopefully have more self-explanatory-er names.

Signed-off-by: Carlos Alexandro Becker <[email protected]>
@caarlos0 caarlos0 requested a review from erikgeiser February 2, 2021 03:23
@caarlos0 caarlos0 added the enhancement New feature or request label Feb 2, 2021
Signed-off-by: Carlos Alexandro Becker <[email protected]>
@codecov
Copy link

codecov bot commented Feb 2, 2021

Codecov Report

Merging #15 (779a8a5) into main (db715ee) will decrease coverage by 1.67%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
- Coverage   83.67%   82.00%   -1.68%     
==========================================
  Files           2        2              
  Lines          98      100       +2     
==========================================
  Hits           82       82              
- Misses          9       11       +2     
  Partials        7        7              
Impacted Files Coverage Δ
glob.go 80.64% <100.00%> (-2.69%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db715ee...779a8a5. Read the comment docs.

Copy link
Member

@erikgeiser erikgeiser left a comment

Choose a reason for hiding this comment

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

Yeah, that's much better. It would also be possible for MatchDirectoryIncludesContents and MatchDirectoryAsFile to be OptFuncs themselves such that they don't have to be called. WDYT?

Signed-off-by: Carlos Alexandro Becker <[email protected]>
@pull-request-size pull-request-size bot added size/S and removed size/M labels Feb 2, 2021
@caarlos0 caarlos0 merged commit 7408fde into main Feb 3, 2021
@caarlos0 caarlos0 deleted the opts branch February 3, 2021 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants