func verifyFiles(clauses []Clause) ([]Clause, error) {
	if len(clauses) == 0 {
		return nil, fmt.Errorf("no clauses")
	}
	for i, clause := range clauses {
		clause.Op = strings.ToLower(strings.TrimSpace(clause.Op))
		switch clause.Op {
		case "r", "w":
		default:
			return nil, fmt.Errorf("unknown operation")
		}
		clause.File = path.Clean(clause.File)
		clauses[i] = clause
		if _, err := os.Stat(clause.File); err != nil { // Make sure the files exist
			return nil, fmt.Errorf("cannot stat file %s: %s", clause.File, err.Error())
		}
	}
	return clauses, nil
}
// verifyFiles runs some basic sanity checks on the wait file names
verifyFiles runs some basic sanity checks on the wait file names
// verifyFiles runs some basic sanity checks on the wait file names
func verifyFiles(clauses []Clause) ([]Clause, error) {
	if len(clauses) == 0 {
		return nil, fmt.Errorf("no clauses")
	}
	for i, clause := range clauses {
		clause.Op = strings.ToLower(strings.TrimSpace(clause.Op))
		switch clause.Op {
		case "r", "w":
		default:
			return nil, fmt.Errorf("unknown operation")
		}
		clause.File = path.Clean(clause.File)
		clauses[i] = clause
		if _, err := os.Stat(clause.File); err != nil { 
			return nil, fmt.Errorf("cannot stat file %s: %s", clause.File, err.Error())
		}
	}
	return clauses, nil
}
func verifyFiles ( clauses [ ] Clause ) ( [ ] Clause , error ) { if len ( clauses ) == 0 { return nil , fmt . Errorf ( " " ) } for i , clause := range clauses { clause . Op = strings . ToLower ( strings . TrimSpace ( clause . Op ) ) switch clause . Op { case " " , " " : default : return nil , fmt . Errorf ( " " ) } clause . File = path . Clean ( clause . File ) clauses [ i ] = clause if _ , err := os . Stat ( clause . File ) ; err != nil { return nil , fmt . Errorf ( " " , clause . File , err . Error ( ) ) } } return clauses , nil }
verifyFiles runs some basic sanity checks on the wait file names
verifyFiles runs some basic sanity checks on the wait file names
// Make sure the files exist