Skip to content

Conversation

llorllale
Copy link

This is pretty much the same proposal as in #45 except for:

  • we reuse the standard encoding.TextUnmarshaler interface
  • we uphold the guarantee of Preserves non-initial values from being reset with a default value
  • a mention in the README

@llorllale
Copy link
Author

hmm any hints as to why we're still building against an unsupported version of Go?

@llorllale
Copy link
Author

hmm any hints as to why we're still building against an unsupported version of Go?

@servusdei2018 can I get your feedback on this?

@servusdei2018
Copy link

hmm any hints as to why we're still building against an unsupported version of Go?

@servusdei2018 can I get your feedback on this?

Oh I believe in the context of #45, checking t.Field(i).PkgPath was used instead of isExported (introduced in go1.17) to preserve compatibility with go1.14 as specified in go.mod

It's definitely possible to bump to go1.17; as of now even the slower distros (e.g. Debian Bookworm) are up to go1.19, so a bump to 1.17 would be fine I think. It's probably be best to bump the required Go version to the minimum necessary for the language features and standard library changes used in this project but not further so that we maintain compatibility as much as possible with people using older releases.

Copy link

codecov bot commented Mar 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.12%. Comparing base (abebf4b) to head (80cef20).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
+ Coverage   95.97%   96.12%   +0.15%     
==========================================
  Files           2        2              
  Lines         149      155       +6     
==========================================
+ Hits          143      149       +6     
  Misses          3        3              
  Partials        3        3              

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

@llorllale
Copy link
Author

coming back to this:

  • bumped Go ver to 1.17 as discussed above
  • used StructField.PkgPath == "" to determine if member is exported (thus keeping compatibility with 1.17)
  • added another unit test to satisfy coverage threshold

@servusdei2018 @creasty

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