diff --git a/gomall/app/cart/biz/service/add_item.go b/gomall/app/cart/biz/service/add_item.go index a00fbeac..64195b91 100644 --- a/gomall/app/cart/biz/service/add_item.go +++ b/gomall/app/cart/biz/service/add_item.go @@ -50,7 +50,6 @@ func (s *AddItemService) Run(req *cart.AddItemReq) (resp *cart.AddItemResp, err ProductId: req.Item.ProductId, Qty: uint32(req.Item.Quantity), }) - if err != nil { return nil, kerrors.NewBizStatusError(50000, err.Error()) } diff --git a/gomall/app/frontend/biz/service/register.go b/gomall/app/frontend/biz/service/register.go index 17c088ed..f37b71a1 100644 --- a/gomall/app/frontend/biz/service/register.go +++ b/gomall/app/frontend/biz/service/register.go @@ -47,7 +47,6 @@ func (h *RegisterService) Run(req *auth.RegisterReq) (resp *common.Empty, err er session := sessions.Default(h.RequestContext) session.Set("user_id", res.UserId) err = session.Save() - if err != nil { return nil, err } diff --git a/gomall/app/frontend/infra/mtl/metric.go b/gomall/app/frontend/infra/mtl/metric.go index 57769285..f9618f87 100644 --- a/gomall/app/frontend/infra/mtl/metric.go +++ b/gomall/app/frontend/infra/mtl/metric.go @@ -53,7 +53,6 @@ func initMetric() route.CtxCallback { } registryInfo := ®istry.Info{Addr: ip, ServiceName: "prometheus", Weight: 1} err = r.Register(registryInfo) - if err != nil { hlog.Error(err) } diff --git a/gomall/app/payment/biz/service/charge.go b/gomall/app/payment/biz/service/charge.go index 9bd86785..55249ce5 100644 --- a/gomall/app/payment/biz/service/charge.go +++ b/gomall/app/payment/biz/service/charge.go @@ -44,7 +44,6 @@ func (s *ChargeService) Run(req *payment.ChargeReq) (resp *payment.ChargeResp, e } err = card.Validate(true) - if err != nil { return nil, kerrors.NewBizStatusError(400, err.Error()) } diff --git a/gomall/app/product/biz/model/product.go b/gomall/app/product/biz/model/product.go index c1a23362..f8d1c352 100644 --- a/gomall/app/product/biz/model/product.go +++ b/gomall/app/product/biz/model/product.go @@ -76,7 +76,6 @@ func (c CachedProductQuery) GetById(productId int) (product Product, err error) } return nil }() - if err != nil { product, err = c.productQuery.GetById(productId) if err != nil {