Skip to content

Commit

Permalink
feat: allow all fields to be YAML ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelPryanic committed Nov 30, 2024
1 parent 8043fc4 commit 96ff6d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions yamagiconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -873,10 +873,12 @@ func ValidateType[T any]() error {
return fmt.Errorf("at %s: %w", path, err)
}

if !isExported || yamlIgnored {
if isExported {
exportedFields++
}
if yamlIgnored {
continue
}
exportedFields++

// Avoid checking tag redifinition for embedded fields.
// For embedded fields yamlTag will always be == "".
Expand Down

0 comments on commit 96ff6d8

Please sign in to comment.