diff --git a/protocols/s5/config.go b/protocols/s5/config.go index 9fb2b50..a81a411 100644 --- a/protocols/s5/config.go +++ b/protocols/s5/config.go @@ -8,7 +8,7 @@ import ( var _ config.ProtocolConfig = (*Config)(nil) type Config struct { - s5config.NodeConfig + *s5config.NodeConfig DbPath string `mapstructure:"db_path"` } diff --git a/protocols/s5/s5.go b/protocols/s5/s5.go index 4079d67..0698479 100644 --- a/protocols/s5/s5.go +++ b/protocols/s5/s5.go @@ -145,12 +145,14 @@ func configureS5Protocol(proto *S5Protocol) (*s5config.NodeConfig, error) { cfg.DB = db - return interface{}(cfg).(*s5config.NodeConfig), nil + return cfg.NodeConfig, nil } func (s *S5Protocol) Config() config.ProtocolConfig { if s.config == nil { - s.config = &Config{} + s.config = &Config{ + NodeConfig: &s5config.NodeConfig{}, + } } return s.config