From 9955a0d0fc1d12e93c3c6ed2718d142c887c70e2 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 6 May 2023 05:20:47 +0400 Subject: [PATCH] Added metadata file struct descr in an error message for Article.ParseMetadata(). --- pkg/article/article.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/article/article.go b/pkg/article/article.go index c9c3068..d82b4bb 100644 --- a/pkg/article/article.go +++ b/pkg/article/article.go @@ -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])