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

fix: error when trying initialize slice of structs with default tag #46

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

orangejohny
Copy link
Contributor

Hey! I've came across a same issue as here. It seems it can be solved by do not passing default tag value to setField if current field is a slice.

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (5220e08) 95.97% compared to head (586c267) 95.97%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #46   +/-   ##
=======================================
  Coverage   95.97%   95.97%           
=======================================
  Files           2        2           
  Lines         149      149           
=======================================
  Hits          143      143           
  Misses          3        3           
  Partials        3        3           
Files Coverage Δ
defaults.go 95.89% <0.00%> (ø)

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

@rjshrjndrn
Copy link

Hey @creasty Can you please merge this change? it's a major concern.

@rjshrjndrn
Copy link

rjshrjndrn commented Jul 20, 2024

till the PR is merged, if anybody is facing the issue, can use the fork I did from the PR (kudos @orangejohny).
import "github.com/rjshrjndrn/defaults"

Copy link
Owner

@creasty creasty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix and your patience

@creasty creasty merged commit abebf4b into creasty:master Aug 13, 2024
2 of 3 checks passed
@creasty
Copy link
Owner

creasty commented Aug 13, 2024

https://github.com/creasty/defaults/releases/tag/v1.8.0 published.

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