注释掉测试添加购物车异常

master
shenzhuan 2 years ago
parent af403e050f
commit c81696ef3d

@ -11,7 +11,6 @@ import (
"github.com/lithammer/shortuuid/v3"
"github.com/opentracing/opentracing-go"
"go-micro.dev/v4/client"
"go-micro.dev/v4/errors"
"go-micro.dev/v4/web"
"goproduct/common"
"goproduct/proto"
@ -205,7 +204,8 @@ func main() {
}
resp, err = AddCartClient.AddCart(context.TODO(), req)
CartId = resp.ID
err = errors.New("400", "测试异常", 400)
//测试异常
//err = errors.New("400", "测试异常", 400)
if err != nil {
log.Println("/addCart err ", err)
c.JSON(http.StatusOK, gin.H{"dtm_reslut": "FAILURE", "Message": "新增购物车失败!"})

Loading…
Cancel
Save