Skip to content

Commit

Permalink
Fix: missing value during unmarshal YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
chivalryq committed Aug 16, 2024
1 parent bfbf6bd commit d72ca49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ type Schema struct {
func (s *Schema) UnmarshalYAML(node *yaml.Node) error {
// Create an alias type to avoid recursion
type schemaAlias Schema
alias := &schemaAlias{}
alias := new(schemaAlias)
// copy all existing fields
*alias = schemaAlias(*s)

// Unmarshal known fields into alias
if err := node.Decode(alias); err != nil {
Expand Down

0 comments on commit d72ca49

Please sign in to comment.