code: func MergeDaemonConfigurations(flagsConfig *Config, flags *pflag.FlagSet, configFile string) (*Config, error) {
  	fileConfig, err := getConflictFreeConfiguration(configFile, flags)
  	if err != nil {
  		return nil, err
  	}
  
  	if err := Validate(fileConfig); err != nil {
  		return nil, errors.Wrap(err, "configuration validation from file failed")
  	}
  
  	// merge flags configuration on top of the file configuration
  	if err := mergo.Merge(fileConfig, flagsConfig); err != nil {
  		return nil, err
  	}
  
  	// We need to validate again once both fileConfig and flagsConfig
  	// have been merged
  	if err := Validate(fileConfig); err != nil {
  		return nil, errors.Wrap(err, "merged configuration validation from file and command line flags failed")
  	}
  
  	return fileConfig, nil
  }
docs: // MergeDaemonConfigurations reads a configuration file,
  // loads the file configuration in an isolated structure,
  // and merges the configuration provided from flags on top
  // if there are no conflicts.