Skip to content

[configoptional] Make Unmarshal into None[T] match unmarshal into (*T)(nil) #13168

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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

mx-psi
Copy link
Member

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

Description

Makes it so that unmarshaling into a None[T] is equivalent to unmarshaling into a (*T)(nil).
The goal is to be able to do #13109 without introducing any changes to the behavior.

Needs #13161.

Testing

Add a unit test to compare the behavior of unmarshaling into (*T)(nil) with that of unmarshaling into None[T]

Documentation

@mx-psi mx-psi force-pushed the mx-psi/configoptional-to-none-unmarshal branch from 5cd0415 to 53bdd95 Compare June 6, 2025 10:05
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 91.28%. Comparing base (c9aaed8) to head (e493250).

Files with missing lines Patch % Lines
confmap/confmap.go 68.96% 7 Missing and 2 partials ⚠️

❌ Your patch check has failed because the patch coverage (75.00%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13168      +/-   ##
==========================================
- Coverage   91.29%   91.28%   -0.02%     
==========================================
  Files         509      509              
  Lines       28735    28764      +29     
==========================================
+ Hits        26233    26256      +23     
- Misses       1988     1993       +5     
- Partials      514      515       +1     

☔ 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.

@mx-psi mx-psi force-pushed the mx-psi/configoptional-to-none-unmarshal branch from 53bdd95 to e493250 Compare June 6, 2025 11:22
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.

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