In GetArticle() func removed unnecessary else {} nesting.
This commit is contained in:
parent
69493f50aa
commit
fbb4389065
@ -50,7 +50,8 @@ func GetArticleMetadata() (meta []ArticleMetadata) {
|
||||
func GetArticle(name string) (*article.Article, error) {
|
||||
if artcl, ok := articles[name]; ok {
|
||||
return &artcl, nil
|
||||
} else {
|
||||
}
|
||||
|
||||
meta, err := articlesFS.ReadFile("articles/" + name + articleMetaExtension)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -70,7 +71,6 @@ func GetArticle(name string) (*article.Article, error) {
|
||||
|
||||
return &artcl, nil
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
entries, _ := articlesFS.ReadDir("articles")
|
||||
|
Loading…
Reference in New Issue
Block a user