update example
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user