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

Refactor connection expand func #800

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Conversation

sergiught
Copy link
Contributor

@sergiught sergiught commented Aug 30, 2023

🔧 Changes

This PR simplifies the expand logic for the connection resources, primarily it reduces cyclomatic complexity (how many independent paths or decision points exist within a piece of code) by transforming the switch statement into a hash map.

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@sergiught sergiught marked this pull request as ready for review August 30, 2023 12:15
@sergiught sergiught requested a review from a team as a code owner August 30, 2023 12:15
@codecov-commenter
Copy link

Codecov Report

Merging #800 (bfb9f2b) into v1 (a9e6cf9) will increase coverage by 0.02%.
The diff coverage is 91.42%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##               v1     #800      +/-   ##
==========================================
+ Coverage   90.49%   90.51%   +0.02%     
==========================================
  Files          99       99              
  Lines       13256    13226      -30     
==========================================
- Hits        11996    11972      -24     
+ Misses        893      889       -4     
+ Partials      367      365       -2     
Files Changed Coverage Δ
internal/auth0/connection/expand.go 96.66% <91.42%> (-0.16%) ⬇️

... and 1 file with indirect coverage changes

@sergiught sergiught merged commit 923b089 into v1 Aug 31, 2023
@sergiught sergiught deleted the patch/enterprise-connection-options branch August 31, 2023 12:10
Sign up for free to 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.

3 participants