Added metadata file struct descr in an error message for Article.ParseMetadata().
This commit is contained in:
parent
c80d49dab5
commit
9955a0d0fc
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user