Skip to content

Commit

Permalink
fix shorturl example code (zeromicro#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
WangLeonard authored Sep 3, 2020
1 parent 33eb293 commit 1e85f74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion example/shorturl/api/internal/logic/expandlogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down
4 changes: 3 additions & 1 deletion example/shorturl/api/internal/logic/shortenlogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down

0 comments on commit 1e85f74

Please sign in to comment.