1
0

Added metadata file struct descr in an error message for Article.ParseMetadata().

This commit is contained in:
Alexander Andreev 2023-05-06 05:20:47 +04:00
parent c80d49dab5
commit 9955a0d0fc
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -16,7 +16,7 @@ type Article struct {
func (artcl *Article) ParseMetadata(data []byte) error {
lines := bytes.Split(data, []byte{'\n'})
if len(lines) != 3 {
return errors.New("metadata file is not complete")
return errors.New("metadata file is not complete. 3 lines (title, date(DD MM YYYY), descr) should present")
}
artcl.Title = string(lines[0])