code: func validateConfig(f string) error {
  	viper.SetConfigFile(f)
  	err := viper.ReadInConfig()
  	if err != nil {
  		switch err.(type) {
  		case viper.ConfigParseError:
  			return err
  		default:
  			return errors.New("unable to locate config file, use \"centrifugo genconfig -c " + f + "\" command to generate one")
  		}
  	}
  	c := nodeConfig()
  	return c.Validate()
  }
docs: // validateConfig validates config file located at provided path.