update example

This commit is contained in:
kevin
2020-09-27 11:10:21 +08:00
parent bc831b75dd
commit 54e9d01312
15 changed files with 138 additions and 23 deletions

View File

@@ -6,9 +6,10 @@
package adder
import (
add "bookstore/rpc/add/pb"
"context"
add "bookstore/rpc/add/pb"
"github.com/tal-tech/go-zero/core/jsonx"
"github.com/tal-tech/go-zero/zrpc"
)

View File

@@ -1,10 +1,11 @@
package logic
import (
"context"
"bookstore/rpc/add/internal/svc"
add "bookstore/rpc/add/pb"
"bookstore/rpc/model"
"context"
"github.com/tal-tech/go-zero/core/logx"
)
@@ -35,4 +36,4 @@ func (l *AddLogic) Add(in *add.AddReq) (*add.AddResp, error) {
return &add.AddResp{
Ok: true,
}, nil
}
}

View File

@@ -4,10 +4,11 @@
package server
import (
"context"
"bookstore/rpc/add/internal/logic"
"bookstore/rpc/add/internal/svc"
add "bookstore/rpc/add/pb"
"context"
)
type AdderServer struct {

View File

@@ -6,9 +6,10 @@
package checker
import (
check "bookstore/rpc/check/pb"
"context"
check "bookstore/rpc/check/pb"
"github.com/tal-tech/go-zero/core/jsonx"
"github.com/tal-tech/go-zero/zrpc"
)

View File

@@ -1,9 +1,10 @@
package logic
import (
"context"
"bookstore/rpc/check/internal/svc"
check "bookstore/rpc/check/pb"
"context"
"github.com/tal-tech/go-zero/core/logx"
)
@@ -32,4 +33,4 @@ func (l *CheckLogic) Check(in *check.CheckReq) (*check.CheckResp, error) {
Found: true,
Price: resp.Price,
}, nil
}
}

View File

@@ -4,10 +4,11 @@
package server
import (
"context"
"bookstore/rpc/check/internal/logic"
"bookstore/rpc/check/internal/svc"
check "bookstore/rpc/check/pb"
"context"
)
type CheckerServer struct {