Skip to content

Commit

Permalink
fix bug that caused unmarshaling to use an empty struct, which resulted
Browse files Browse the repository at this point in the history
in all default values being missing

Signed-off-by: Callum Styan <callumstyan@gmail.com>
  • Loading branch information
cstyan committed Oct 7, 2024
1 parent c2f38e1 commit 57d1deb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion clients/pkg/promtail/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 57d1deb

Please sign in to comment.