Skip to content

Commit 9079f59

Browse files
committed
feat: add mapstructure name tag support to config struct for viper dynamic config compatibility
Signed-off-by: Emre Kosen <kosenemre@gmail.com>
1 parent 2d1e52f commit 9079f59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ func (k *Kafka) GetCompression() int8 {
4040
}
4141

4242
type Connector struct {
43-
Kafka Kafka `yaml:"kafka"`
44-
Dcp config.Dcp `yaml:",inline"`
43+
Kafka Kafka `yaml:"kafka" mapstructure:"kafka"`
44+
Dcp config.Dcp `yaml:",inline" mapstructure:",squash"`
4545
}
4646

4747
func (c *Connector) ApplyDefaults() {

0 commit comments

Comments
 (0)