func getYamlFiles()

in generatebundlefile/options.go [44:66]


func getYamlFiles() ([]string, error) {
	f := []string{}
	pwd, _ := os.Getwd()
	err := filepath.Walk(pwd, func(path string, info os.FileInfo, err error) error {
		if err != nil {
			fmt.Println(err)
			return err
		}
		endsWith := strings.HasSuffix(path, ".yaml")
		if endsWith {
			notoutput := strings.Contains(path, "output/")
			if !notoutput {
				f = append(f, path)
			}
		}
		return nil
	})
	if err != nil {
		fmt.Println(err)
		return nil, err
	}
	return f, err
}