// ListWorkflows List all workflows in the project
ListWorkflows List all workflows in the project
// ListWorkflows List all workflows in the project
func ListWorkflows() ([]string, error) {
	workflowsDirectory, err := getWorkflowsDirectory()
	if err != nil {
		return []string{}, nil
	}
	workflows, err := ioutil.ReadDir(workflowsDirectory)
	if err != nil {
		return []string{}, nil
	}
	var workflowNames []string
	for _, workflow := range workflows {
		if !workflow.IsDir() && filepath.Ext(workflow.Name()) == workflowExtension {
			workflowNames = append(workflowNames, strings.TrimSuffix(workflow.Name(), workflowExtension))
		}
	}
	return workflowNames, nil
}
func ListWorkflows ( ) ( [ ] string , error ) { workflowsDirectory , err := getWorkflowsDirectory ( ) if err != nil { return [ ] string { } , nil } workflows , err := ioutil . ReadDir ( workflowsDirectory ) if err != nil { return [ ] string { } , nil } var workflowNames [ ] string for _ , workflow := range workflows { if ! workflow . IsDir ( ) && filepath . Ext ( workflow . Name ( ) ) == workflowExtension { workflowNames = append ( workflowNames , strings . TrimSuffix ( workflow . Name ( ) , workflowExtension ) ) } } return workflowNames , nil }
ListWorkflows List all workflows in the project
ListWorkflows List all workflows in the project