meta: fix newline handling

This commit is contained in:
Stanislav Seletskiy
2019-08-13 19:48:11 +03:00
parent eb9f094a2d
commit ecee64f778

View File

@@ -45,7 +45,7 @@ func ExtractMeta(data []byte) (*Meta, []byte, error) {
return nil, nil, err return nil, nil, err
} }
offset += len(line) offset += len(line) + 1
matches := reHeaderPatternV2.FindStringSubmatch(line) matches := reHeaderPatternV2.FindStringSubmatch(line)
if matches == nil { if matches == nil {
@@ -119,5 +119,5 @@ func ExtractMeta(data []byte) (*Meta, []byte, error) {
) )
} }
return meta, data[offset+1:], nil return meta, data[offset:], nil
} }