Skip to content

Commit 9002847

Browse files
author
Luca Bruno
authored
Merge pull request coreos#263 from muesli/unit-bytes-contains
unit: use ContainsAny instead of IndexAny
2 parents f3b2571 + 7827196 commit 9002847

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ env:
1414
global:
1515
- IMPORTPATH=github.com/coreos/go-systemd
1616
- GOPATH=/opt
17-
- GO15VENDOREXPERIMENT=1
1817
- DEP_BINDIR=/tmp
1918
- BUILD_DIR=/opt/src/github.com/coreos/go-systemd
2019
matrix:

unit/deserialize.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (l *lexer) lex() {
8888
l.errchan <- err
8989
return
9090
}
91-
if bytes.IndexAny(line, SYSTEMD_NEWLINE) == -1 {
91+
if !bytes.ContainsAny(line, SYSTEMD_NEWLINE) {
9292
l.errchan <- ErrLineTooLong
9393
return
9494
}

0 commit comments

Comments
 (0)