code: func NewConfig(rootLogger *logrus.Logger, cfgfile string) Config {
  	logger := rootLogger.WithFields(logrus.Fields{"prefix": "config"})
  
  	viper.SetConfigFile(cfgfile)
  	input, err := ioutil.ReadFile(cfgfile)
  	if err != nil {
  		logger.Fatalf("Failed to read configuration file: %#v", err)
  	}
  
  	mycfg := newConfigFromString(logger, input)
  	if mycfg.cv.General.MediaDownloadSize == 0 {
  		mycfg.cv.General.MediaDownloadSize = 1000000
  	}
  	viper.WatchConfig()
  	viper.OnConfigChange(func(e fsnotify.Event) {
  		logger.Println("Config file changed:", e.Name)
  	})
  	return mycfg
  }
docs: // NewConfig instantiates a new configuration based on the specified configuration file path.