Passed
Push — main ( 0795ea...57a23e )
by Yume
02:19 queued 01:06
created

mcq.NewUseCase   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package mcq
2
3
import (
4
	"context"
5
6
	"github.com/memnix/memnix-rest/domain"
7
)
8
9
type UseCase struct {
10
	IRepository
11
	IRedisRepository
12
}
13
14
func (c *UseCase) GetByID(ctx context.Context, id uint) (domain.Mcq, error) {
15
	return c.IRepository.GetByID(ctx, id)
16
}
17
18
func NewUseCase(repo IRepository, redis IRedisRepository) IUseCase {
19
	return &UseCase{IRepository: repo, IRedisRepository: redis}
20
}
21