[chore] Clarify that Unmarshaler only supports structs (#13045)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Clarifies usage of `confmap.Unmarshaler`. This is a limitation that
currently exists since mapstructure will fail to map between the types.
This commit is contained in:
Pablo Baeyens 2025-05-16 13:49:08 +02:00 committed by GitHub
parent 97a6accbc0
commit 943627b0fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -543,6 +543,7 @@ func marshalerHookFunc(orig any) mapstructure.DecodeHookFuncValue {
}
// Unmarshaler interface may be implemented by types to customize their behavior when being unmarshaled from a Conf.
// Only types with struct or pointer to struct kind are supported.
type Unmarshaler interface {
// Unmarshal a Conf into the struct in a custom way.
// The Conf for this specific component may be nil or empty if no config available.