fix typo (#38)

fix typo: *shorten.ShortenReq -> *transform.ShortenReq
master
windk 4 years ago committed by GitHub
parent 4dfbd66323
commit a1d2ea9d85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -431,7 +431,7 @@
* 修改`rpc/transform/internal/logic/expandlogic.go`,如下: * 修改`rpc/transform/internal/logic/expandlogic.go`,如下:
```go ```go
func (l *ExpandLogic) Expand(in *expand.ExpandReq) (*expand.ExpandResp, error) { func (l *ExpandLogic) Expand(in *transform.ExpandReq) (*transform.ExpandResp, error) {
// 手动代码开始 // 手动代码开始
res, err := l.svcCtx.Model.FindOne(in.Shorten) res, err := l.svcCtx.Model.FindOne(in.Shorten)
if err != nil { if err != nil {
@ -448,7 +448,7 @@
* 修改`rpc/shorten/internal/logic/shortenlogic.go`,如下: * 修改`rpc/shorten/internal/logic/shortenlogic.go`,如下:
```go ```go
func (l *ShortenLogic) Shorten(in *shorten.ShortenReq) (*shorten.ShortenResp, error) { func (l *ShortenLogic) Shorten(in *transform.ShortenReq) (*transform.ShortenResp, error) {
// 手动代码开始,生成短链接 // 手动代码开始,生成短链接
key := hash.Md5Hex([]byte(in.Url))[:6] key := hash.Md5Hex([]byte(in.Url))[:6]
_, err := l.svcCtx.Model.Insert(model.Shorturl{ _, err := l.svcCtx.Model.Insert(model.Shorturl{

Loading…
Cancel
Save