// ParseConfigFile parses the config file path from the project root directory and returns the validator data
ParseConfigFile parses the config file path from the project root directory and returns the validator data
// ParseConfigFile parses the config file path from the project root directory and returns the validator data
func ParseConfigFile(localPath string, structure interface{}) error {
	projectPath, err := getProjectRootPath()
	if err != nil {
		return fmt.Errorf("error getting project root path: %s", err)
	}
	yamlFile, err := ioutil.ReadFile(path.Join(projectPath, localPath))
	if err != nil {
		return fmt.Errorf("error while reading file given from input: %s", err)
	}
	err = yaml.Unmarshal(yamlFile, structure)
	if err != nil {
		return fmt.Errorf("error while parsing config yaml file: %s", err)
	}
	return nil
}
func ParseConfigFile ( localPath string , structure interface { } ) error { projectPath , err := getProjectRootPath ( ) if err != nil { return fmt . Errorf ( " " , err ) } yamlFile , err := ioutil . ReadFile ( path . Join ( projectPath , localPath ) ) if err != nil { return fmt . Errorf ( " " , err ) } err = yaml . Unmarshal ( yamlFile , structure ) if err != nil { return fmt . Errorf ( " " , err ) } return nil }
ParseConfigFile parses the config file path from the project root directory and returns the validator data
ParseConfigFile parses the config file path from the project root directory and returns the validator data