19 announcementCount, err := db.DB.ProductFieldPostCount(productIdInt, "announcements", true)
20 underReviewCount, err := db.DB.ProductFieldPostCount(productIdInt, "under-review", false)
21 workingOnCount, err := db.DB.ProductFieldPostCount(productIdInt, "working-on", false)
22 doneCount, err := db.DB.ProductFieldPostCount(productIdInt, "done", false)23 return c.JSON(fiber.Map{
24 "bugs": bugCount,
25 "announcements": announcementCount,
18 suggestionCount, err := db.DB.ProductFieldPostCount(productIdInt, "suggestions", true)
19 announcementCount, err := db.DB.ProductFieldPostCount(productIdInt, "announcements", true)
20 underReviewCount, err := db.DB.ProductFieldPostCount(productIdInt, "under-review", false)
21 workingOnCount, err := db.DB.ProductFieldPostCount(productIdInt, "working-on", false)22 doneCount, err := db.DB.ProductFieldPostCount(productIdInt, "done", false)
23 return c.JSON(fiber.Map{
24 "bugs": bugCount,
17 bugCount, err := db.DB.ProductFieldPostCount(productIdInt, "bugs", true)
18 suggestionCount, err := db.DB.ProductFieldPostCount(productIdInt, "suggestions", true)
19 announcementCount, err := db.DB.ProductFieldPostCount(productIdInt, "announcements", true)
20 underReviewCount, err := db.DB.ProductFieldPostCount(productIdInt, "under-review", false)21 workingOnCount, err := db.DB.ProductFieldPostCount(productIdInt, "working-on", false)
22 doneCount, err := db.DB.ProductFieldPostCount(productIdInt, "done", false)
23 return c.JSON(fiber.Map{
16 }
17 bugCount, err := db.DB.ProductFieldPostCount(productIdInt, "bugs", true)
18 suggestionCount, err := db.DB.ProductFieldPostCount(productIdInt, "suggestions", true)
19 announcementCount, err := db.DB.ProductFieldPostCount(productIdInt, "announcements", true)20 underReviewCount, err := db.DB.ProductFieldPostCount(productIdInt, "under-review", false)
21 workingOnCount, err := db.DB.ProductFieldPostCount(productIdInt, "working-on", false)
22 doneCount, err := db.DB.ProductFieldPostCount(productIdInt, "done", false)
15 })
16 }
17 bugCount, err := db.DB.ProductFieldPostCount(productIdInt, "bugs", true)
18 suggestionCount, err := db.DB.ProductFieldPostCount(productIdInt, "suggestions", true)19 announcementCount, err := db.DB.ProductFieldPostCount(productIdInt, "announcements", true)
20 underReviewCount, err := db.DB.ProductFieldPostCount(productIdInt, "under-review", false)
21 workingOnCount, err := db.DB.ProductFieldPostCount(productIdInt, "working-on", false)
Value has been assigned to a variable, but it is being overwritten before being read. In most cases, this could be a forgotten error check or dead code.
err := Op1()
// error value assigned to "err" by "Op1" is replaced with
// error value assigned by "Op2" before even being read even
// once
err = Op2()
if err != nil {
return err
}
// Ignore the error value returned by "Op1"
Op1()
err := Op2()
if err != nil {
return err
}
err := Op1()
// Read the error value assigned to "err" by "Op1"
if err != nil {
return err
}
err = Op2()
if err != nil {
return err
}