From 9209f227c43901f54a64392194385a800700bc67 Mon Sep 17 00:00:00 2001 From: Niko Abeler Date: Mon, 5 Dec 2022 19:11:48 +0100 Subject: [PATCH] removed unused title in Post --- post.go | 3 +-- user.go | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/post.go b/post.go index a4d4ab0..6b8cb04 100644 --- a/post.go +++ b/post.go @@ -20,7 +20,6 @@ import ( type Post struct { user *User id string - title string metaLoaded bool meta PostMeta wmLock sync.Mutex @@ -155,7 +154,7 @@ func (post *Post) UrlMediaPath(filename string) string { } func (post *Post) Title() string { - return post.title + return post.Meta().Title } func (post *Post) ContentFile() string { diff --git a/user.go b/user.go index b6bfad5..d7ac96e 100644 --- a/user.go +++ b/user.go @@ -285,11 +285,6 @@ func (user User) GetPost(id string) (*Post, error) { } post := Post{user: &user, id: id} - // post.loadMeta() - meta := post.Meta() - title := meta.Title - post.title = fmt.Sprint(title) - return &post, nil } @@ -312,7 +307,7 @@ func (user User) CreateNewPostFull(meta PostMeta, content string) (*Post, error) break } } - post := Post{user: &user, id: folder_name, title: slugHint} + post := Post{user: &user, id: folder_name} initial_content := "" initial_content += "---\n"