Skip to content

Make all NewDefault* functions return structs instead of pointers #13169

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Jun 6, 2025

Description

Some NewDefault*Config functions return *Config, while others return Config. As far as I can tell, this is solely because it was easier to write the code for existing usages of the configs. I think that's not the right approach: in my opinion, we should return either always Config or always *Config, and the former seems to be more natural to me (since the pointer should never be nil)

@mx-psi mx-psi marked this pull request as ready for review June 6, 2025 16:10
@mx-psi mx-psi requested a review from a team as a code owner June 6, 2025 16:10
@mx-psi mx-psi requested a review from bogdandrutu June 6, 2025 16:10
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.29%. Comparing base (c9aaed8) to head (f185ec0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13169   +/-   ##
=======================================
  Coverage   91.29%   91.29%           
=======================================
  Files         509      509           
  Lines       28735    28739    +4     
=======================================
+ Hits        26233    26237    +4     
  Misses       1988     1988           
  Partials      514      514           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy