// NewSet returns a CheckSet based on a provided list of directories
NewSet returns a CheckSet based on a provided list of directories
// NewSet returns a CheckSet based on a provided list of directories
func NewSet(relativeDirs []string) (CheckSet, error) {
	var err error
	dirs := make([]string, len(relativeDirs))
	for index, item := range relativeDirs {
		dirs[index], err = filepath.Abs(item)
		if err != nil {
			return CheckSet{}, err
		}
	}
	var cs CheckSet
	for _, item := range dirs {
		newSet, err := newSetFromDir(item)
		if err != nil {
			return CheckSet{}, err
		}
		cs = append(cs, newSet...)
	}
	return cs, nil
}
func NewSet ( relativeDirs [ ] string ) ( CheckSet , error ) { var err error dirs := make ( [ ] string , len ( relativeDirs ) ) for index , item := range relativeDirs { dirs [ index ] , err = filepath . Abs ( item ) if err != nil { return CheckSet { } , err } } var cs CheckSet for _ , item := range dirs { newSet , err := newSetFromDir ( item ) if err != nil { return CheckSet { } , err } cs = append ( cs , newSet ... ) } return cs , nil }
NewSet returns a CheckSet based on a provided list of directories
NewSet returns a CheckSet based on a provided list of directories