mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 19:53:21 +02:00
21 lines
395 B
Go
21 lines
395 B
Go
package useCases
|
|
|
|
import (
|
|
. "GohCMS2/adapters/secondary/gateways"
|
|
. "GohCMS2/domain/article"
|
|
)
|
|
|
|
type GetArticleUseCase struct {
|
|
articleRepository ArticleRepository
|
|
}
|
|
|
|
func NewGetArticleUseCase() *GetArticleUseCase {
|
|
return &GetArticleUseCase{
|
|
articleRepository: *NewArticleRepository(),
|
|
}
|
|
}
|
|
|
|
func (g *GetArticleUseCase) GetArticle(id int) Article {
|
|
return g.articleRepository.Get(id)
|
|
}
|