Skip to content

[confmap] Embedded structs fail to unmarshal #12709

@bogdandrutu

Description

@bogdandrutu

Component(s)

confmap

What happened?

type Config struct {
	FooConfig `mapstructure:"foo"`
	Encoding  string  `mapstructure:"encoding"`
}

type FooConfig struct {
   MyString "my_foo_string"
} 

Now, if we define the "Unmarshal" on "FooConfig" we will get an error that encoding is not defined. This is a problem that will stop development for FooConfig.

Collector version

v0.122.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions