magiconair / properties

Java properties scanner for Go
BSD 2-Clause "Simplified" License
323 stars 77 forks source link

Skip ignored private fields #60

Closed rholandameli closed 3 years ago

rholandameli commented 3 years ago

This pull request allows adding some private fields on properties structs without having problems, only marking this field as skipped with a specific tag as the test example below.:

    type S struct {
        p     string `properties:"-"`
        X     string `properties:"-"`
        Undef string `properties:",default=some value"`
    }

This change will avoid an error cannot set p using the struct above.