Use short syntax for errcheck where possible

This commit is contained in:
2022-02-20 16:51:28 +00:00
parent 9b92e2b551
commit 1a1971246d
2 changed files with 3 additions and 4 deletions

View File

@@ -14,8 +14,7 @@ type newBudgetInformation struct {
func (h *Handler) newBudget(c *gin.Context) {
var newBudget newBudgetInformation
err := c.BindJSON(&newBudget)
if err != nil {
if err := c.BindJSON(&newBudget); err != nil {
c.AbortWithError(http.StatusNotAcceptable, err)
return
}