Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package user |
||
2 | |||
3 | import ( |
||
4 | "github.com/memnix/memnix-rest/pkg/utils" |
||
5 | ) |
||
6 | |||
7 | type UseCase struct { |
||
8 | IRepository |
||
9 | } |
||
10 | |||
11 | func (u UseCase) GetName(id string) string { |
||
12 | uintID, _ := utils.ConvertStrToUInt(id) |
||
13 | |||
14 | return u.IRepository.GetName(uintID) |
||
15 | } |
||
16 | |||
17 | func NewUseCase(repo IRepository) IUseCase { |
||
18 | return &UseCase{IRepository: repo} |
||
19 | } |
||
20 |