Skip to content

Commit

Permalink
feat: add mapstructure name tag support to config struct for viper dy…
Browse files Browse the repository at this point in the history
…namic config compatibility (#76)

Signed-off-by: Emre Kosen <[email protected]>
  • Loading branch information
emrekosen authored Dec 11, 2023
1 parent 2d1e52f commit 4fba1ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func (k *Kafka) GetCompression() int8 {
}

type Connector struct {
Kafka Kafka `yaml:"kafka"`
Dcp config.Dcp `yaml:",inline"`
Kafka Kafka `yaml:"kafka" mapstructure:"kafka"`
Dcp config.Dcp `yaml:",inline" mapstructure:",squash"`
}

func (c *Connector) ApplyDefaults() {
Expand Down

0 comments on commit 4fba1ce

Please sign in to comment.