fix golint issues (#584)

This commit is contained in:
Kevin Wan
2021-03-28 20:42:11 +08:00
committed by GitHub
parent 888551627c
commit bbb4ce586f
2 changed files with 30 additions and 16 deletions

View File

@@ -7,9 +7,11 @@ import (
"google.golang.org/grpc/status"
)
// DespositServer is used for mocking.
type DepositServer struct {
}
// Deposit handles the deposit requests.
func (*DepositServer) Deposit(ctx context.Context, req *DepositRequest) (*DepositResponse, error) {
if req.GetAmount() < 0 {
return nil, status.Errorf(codes.InvalidArgument, "cannot deposit %v", req.GetAmount())