fix: all remaining "article" replaced by "post"

All instances of the term "article" were replaced with "post" in variable names, type names, function names, etc. This was primarily to ensure consistent naming and reduce confusion going forward. The term "post" was chosen as it's a more commonly used term for the involved operations in the context of content management and blogging platforms. All tests were also updated to reflect these changes.
This commit is contained in:
Florian Sylvain
2023-09-06 03:38:52 +02:00
parent 509329951f
commit e113c79a6d
8 changed files with 62 additions and 62 deletions
+7 -7
View File
@@ -6,16 +6,16 @@ import (
"gorm.io/gorm"
)
type GetArticleUseCase struct {
articleRepository gateways.PostRepository
type GetPostUseCase struct {
postRepository gateways.PostRepository
}
func NewGetArticleUseCase(db *gorm.DB) *GetArticleUseCase {
return &GetArticleUseCase{
articleRepository: *gateways.NewPostRepository(db),
func NewGetPostUseCase(db *gorm.DB) *GetPostUseCase {
return &GetPostUseCase{
postRepository: *gateways.NewPostRepository(db),
}
}
func (g *GetArticleUseCase) GetArticle(id uint32) (post.Post, error) {
return g.articleRepository.Get(id)
func (g *GetPostUseCase) GetPost(id uint32) (post.Post, error) {
return g.postRepository.Get(id)
}