Use short syntax for errcheck where possible
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user