1
0
Fork 0
mirror of https://github.com/Luzifer/sii.git synced 2024-12-20 16:11:17 +00:00

Spare a little CPU resources

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-01-04 00:37:58 +01:00
parent 8b43a5d38e
commit 2167e6ffa7
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -67,7 +67,7 @@ func ParseSIIPlainFile(r io.Reader) (*Unit, error) {
return nil, errors.New("Unexpected closing braces")
case blockStartRegex.MatchString(line) && !inBlock:
case !inBlock && blockStartRegex.MatchString(line):
if !inUnit {
return nil, errors.New("Unexpected block start outside unit")
}