Skip to content

Supported set to pointers#64

Open
excavador wants to merge 1 commit intolalamove:masterfrom
excavador:supported-assign-to-pointers
Open

Supported set to pointers#64
excavador wants to merge 1 commit intolalamove:masterfrom
excavador:supported-assign-to-pointers

Conversation

@excavador
Copy link
Copy Markdown

Supported assign parsed value not only to value types (string, bool, etcetera) but also to pointer types (*string, *bool, etcetera). It's very useful to distinguish missed in config value from present in config

…etcetera) but also to pointer types (*string, *bool, etcetera). It's very useful to distinguish missed in config value from present in config
@excavador excavador force-pushed the supported-assign-to-pointers branch from 10d8e30 to 8c4db8b Compare July 15, 2020 17:51
@excavador
Copy link
Copy Markdown
Author

Any updates?

1 similar comment
@excavador
Copy link
Copy Markdown
Author

Any updates?

@nishaad78
Copy link
Copy Markdown
Contributor

nishaad78 commented Jul 24, 2020

Adding pointer values for primitive types unnecessarily adds bloat and complexity to the code.
I would recommend instead to check for zero values and either throw an error or add defaults for your use case.

@nishaad78 nishaad78 closed this Jul 24, 2020
@nishaad78
Copy link
Copy Markdown
Contributor

Can you provide a concrete example where this feature would be useful for you?

@nishaad78 nishaad78 reopened this Jul 24, 2020
@excavador
Copy link
Copy Markdown
Author

Any updates?

@excavador
Copy link
Copy Markdown
Author

@nishaad78 Sometime you need to add "default values".
When you work with default string or int you need to distinguish case "not specified" and "specified zero"

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 4, 2026

Codecov Report

❌ Patch coverage is 24.28571% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.91%. Comparing base (5b61527) to head (8c4db8b).

Files with missing lines Patch % Lines
value.go 24.28% 53 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
- Coverage   94.34%   90.91%   -3.43%     
==========================================
  Files          29       29              
  Lines        1397     1453      +56     
==========================================
+ Hits         1318     1321       +3     
- Misses         44       97      +53     
  Partials       35       35              

☔ 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants