From 57d1deb661e799ca7c270db4a8e65f2e129365ad Mon Sep 17 00:00:00 2001 From: Callum Styan Date: Mon, 7 Oct 2024 09:43:30 -0700 Subject: [PATCH] fix bug that caused unmarshaling to use an empty struct, which resulted in all default values being missing Signed-off-by: Callum Styan --- clients/pkg/promtail/config/config.go | 1 - 1 file changed, 1 deletion(-) diff --git a/clients/pkg/promtail/config/config.go b/clients/pkg/promtail/config/config.go index 0454a8facf49..7e0e2b63fe17 100644 --- a/clients/pkg/promtail/config/config.go +++ b/clients/pkg/promtail/config/config.go @@ -42,7 +42,6 @@ type Config struct { // UnmarshalYAML implements the yaml.Unmarshaler interface. func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error { - *c = Config{} // We want to set c to the defaults and then overwrite it with the input. // To make unmarshal fill the plain data struct rather than calling UnmarshalYAML // again, we have to hide it using a type indirection.