fix shorturl example code (#35)

This commit is contained in:
Leonard Wang
2020-09-03 08:34:11 +08:00
committed by GitHub
parent 33eb2936e8
commit 1e85f74fd8
2 changed files with 6 additions and 2 deletions

View File

@@ -10,12 +10,14 @@ import (
)
type ExpandLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
ctx context.Context
logx.Logger
}
func NewExpandLogic(ctx context.Context, svcCtx *svc.ServiceContext) ExpandLogic {
return ExpandLogic{
svcCtx: svcCtx,
ctx: ctx,
Logger: logx.WithContext(ctx),
}

View File

@@ -10,12 +10,14 @@ import (
)
type ShortenLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
ctx context.Context
logx.Logger
}
func NewShortenLogic(ctx context.Context, svcCtx *svc.ServiceContext) ShortenLogic {
return ShortenLogic{
svcCtx: svcCtx,
ctx: ctx,
Logger: logx.WithContext(ctx),
}