user.UseCase.GetName   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 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