From 1be6d9cb11999b660f3ef1c344dd151d9a018a49 Mon Sep 17 00:00:00 2001 From: Tim Wundenberg Date: Thu, 1 Jan 2026 20:00:19 +0100 Subject: [PATCH] fix: linting --- internal/budget/service.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/budget/service.go b/internal/budget/service.go index 732ab12..0b25fcc 100644 --- a/internal/budget/service.go +++ b/internal/budget/service.go @@ -35,7 +35,7 @@ func (s ServiceImpl) Add(ctx context.Context, user *auth_types.User, budget Budg return nil, core.ErrUnauthorized } - isValid := s.isBudgetValid(ctx, budget) + isValid := s.isBudgetValid(budget) if !isValid { return nil, core.ErrBadRequest } @@ -61,7 +61,7 @@ func (s ServiceImpl) Update(ctx context.Context, user *auth_types.User, budget B return nil, core.ErrBadRequest } - isValid := s.isBudgetValid(ctx, budget) + isValid := s.isBudgetValid(budget) if !isValid { return nil, core.ErrBadRequest } @@ -97,14 +97,14 @@ func (s ServiceImpl) GetAll(ctx context.Context, user *auth_types.User) ([]Budge return s.db.GetAll(ctx, user.Id) } -func (s ServiceImpl) isBudgetValid(ctx context.Context, budget Budget) bool { +func (s ServiceImpl) isBudgetValid(budget Budget) bool { if budget.Description != "" { err := core.ValidateString(budget.Description, "description") if err != nil { - return true + return false } } else if budget.Value < 0 { - return true + return false } return true