libct/user: ParseGroupFilter: use TrimSpace

Same as in other places (other parsers here, as well as golang os/user
parser and glibc parser all tolerate extra space at BOL and EOL).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-07-02 12:15:44 -07:00
parent 120e3a77d8
commit 226dfab0bc
+1 -1
View File
@@ -187,7 +187,7 @@ func ParseGroupFilter(r io.Reader, filter func(Group) bool) ([]Group, error) {
)
for s.Scan() {
text := s.Bytes()
text := bytes.TrimSpace(s.Bytes())
if len(text) == 0 {
continue
}