code: func (gw *Gateway) AddConfig(cfg *config.Gateway) error {
  	gw.Name = cfg.Name
  	gw.MyConfig = cfg
  	if err := gw.mapChannels(); err != nil {
  		gw.logger.Errorf("mapChannels() failed: %s", err)
  	}
  	for _, br := range append(gw.MyConfig.In, append(gw.MyConfig.InOut, gw.MyConfig.Out...)...) {
  		br := br //scopelint
  		err := gw.AddBridge(&br)
  		if err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // AddConfig associates a new configuration with the gateway object.