From d72ca499d97568586c98b93a4c223d322f6ff48b Mon Sep 17 00:00:00 2001 From: Qiao Date: Fri, 16 Aug 2024 18:23:24 +0800 Subject: [PATCH] Fix: missing value during unmarshal YAML --- pkg/schema/schema.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/schema/schema.go b/pkg/schema/schema.go index 4dcd538..52445e5 100644 --- a/pkg/schema/schema.go +++ b/pkg/schema/schema.go @@ -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 {