defaults icon indicating copy to clipboard operation
defaults copied to clipboard

Struct tag boolean values are not parsed properly when specified with double quotes

Open fchikwekwe opened this issue 5 months ago • 4 comments

The README shows this example in the Sample struct:

...
Working bool   `default:"true"`
...

When running the tests in the defaults_test.go boolean values are not properly being parsed when specified in double quotes above. The following pattern passes:

...
Working bool   `default:true`
...

However this is not a preferred way to specify tags in yaml. I'm validating whether this is based on a recent change to the defaults library behavior or if it is related to a specific go version. If I can validate the isssue, I may open a PR related to this soon.

fchikwekwe avatar Jan 18 '24 16:01 fchikwekwe