Strip spaces from items read via --files-from

In #1590, it was mentioned that while lines read from exclude files via
`--exclude-file` have leading and trailing spaces stripped, this is not
the case for lines read via `--files-from`. This commit fixes that,
spaces are always stripped.
This commit is contained in:
Alexander Neumann 2018-02-11 20:56:11 +01:00
parent 7f0d964a05
commit c5575c7ed9
1 changed files with 1 additions and 1 deletions

View File

@ -304,7 +304,7 @@ func readLinesFromFile(filename string) ([]string, error) {
scanner := bufio.NewScanner(r)
for scanner.Scan() {
line := scanner.Text()
line := strings.TrimSpace(scanner.Text())
// ignore empty lines
if line == "" {
continue