func scanForProjectFiles(projType projectType) ([]string, error) {
	searchDir, err := os.Getwd()
	if err != nil {
		return nil, err
	}
	fileList, err := pathutil.ListPathInDirSortedByComponents(searchDir, false)
	if err != nil {
		return nil, fmt.Errorf("failed to search for files in (%s), error: %s", searchDir, err)
	}
	var paths []string
	{
		if projType == iOSProjectType {
			paths, err = ios.FilterRelevantWorkspaceFiles(fileList)
			if err != nil {
				return nil, fmt.Errorf("failed to search for workspace files, error: %s", err)
			}
			if len(paths) == 0 {
				paths, err = ios.FilterRelevantProjectFiles(fileList)
				if err != nil {
					return nil, fmt.Errorf("failed to search for project files, error: %s", err)
				}
			}
		} else if projType == xamarinProjectType {
			paths, err = xamarin.FilterSolutionFiles(fileList)
			if err != nil {
				return nil, fmt.Errorf("failed to search for solution files, error: %s", err)
			}
		}
	}
	if len(paths) == 0 {
		return nil, fmt.Errorf("no project file found: %s", searchDir)
	}
	return paths, nil
}
Scans the root dir for the provided project files
package cmd
import (
	"fmt"
	"os"
	"path"
	"github.com/bitrise-io/bitrise-init/scanners/ios"
	"github.com/bitrise-io/bitrise-init/scanners/xamarin"
	"github.com/bitrise-io/go-utils/colorstring"
	"github.com/bitrise-io/go-utils/log"
	"github.com/bitrise-io/go-utils/pathutil"
	"github.com/bitrise-io/goinp/goinp"
)
type projectType int
const (
	iOSProjectType projectType = iota
	xamarinProjectType
)