code: func InitConfig(cmdRoot string) error {
  
  	err := config.InitViper(nil, cmdRoot)
  	if err != nil {
  		return err
  	}
  
  	err = viper.ReadInConfig() // Find and read the config file
  	if err != nil {            // Handle errors reading the config file
  		// The version of Viper we use claims the config type isn't supported when in fact the file hasn't been found
  		// Display a more helpful message to avoid confusing the user.
  		if strings.Contains(fmt.Sprint(err), "Unsupported Config Type") {
  			return errors.New(fmt.Sprintf("Could not find config file. "+
  				"Please make sure that FABRIC_CFG_PATH is set to a path "+
  				"which contains %s.yaml", cmdRoot))
  		} else {
  			return errors.WithMessage(err, fmt.Sprintf("error when reading %s config file", cmdRoot))
  		}
  	}
  
  	return nil
  }
docs: // InitConfig initializes viper config