Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit fb241bf

Browse files
committed
Fix: linting issues
1 parent 5823463 commit fb241bf

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

core/internal/app/variation/service/variation_service_util.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ func (s *Service) createChildren(
1818
) *res.Errors {
1919
var e res.Errors
2020

21-
s.Senv.Log.Debug().Msgf("Creating child resources for variation: %+v", i)
2221
envs, _err := s.EnvironmentRepo.List(ctx, environment.RootArgs{
2322
WorkspaceKey: a.WorkspaceKey,
2423
ProjectKey: a.ProjectKey,
@@ -39,7 +38,6 @@ func (s *Service) createChildren(
3938
if _err != nil {
4039
e.Append(cons.ErrorInternal, _err.Error())
4140
}
42-
s.Senv.Log.Debug().Msgf("Retrieved targeting resource for flag: %+v", t)
4341

4442
nV := &model.Variation{
4543
ID: i.ID,
@@ -54,10 +52,9 @@ func (s *Service) createChildren(
5452
FallthroughVariations: t.FallthroughVariations,
5553
}
5654
nt.FallthroughVariations = append(nt.FallthroughVariations, nV)
57-
s.TargetingRepo.CreateFallthroughVariations(ctx, nt, tArgs)
58-
// DEBUG
59-
for _, rvs := range nt.FallthroughVariations {
60-
s.Senv.Log.Debug().Msgf("New fallthrough variation for flag: %+v", rvs)
55+
_, _err = s.TargetingRepo.CreateFallthroughVariations(ctx, nt, tArgs)
56+
if _err != nil {
57+
e.Append(cons.ErrorInternal, _err.Error())
6158
}
6259

6360
// 2. update targeting rules with new environment
@@ -73,14 +70,10 @@ func (s *Service) createChildren(
7370
}
7471
for _, tr := range trs {
7572
tr.RuleVariations = append(tr.RuleVariations, nV)
76-
ntr, _err := s.TargetingRuleRepo.CreateRuleVariations(ctx, *tr, trArgs)
73+
_, _err := s.TargetingRuleRepo.CreateRuleVariations(ctx, *tr, trArgs)
7774
if _err != nil {
7875
e.Append(cons.ErrorInternal, _err.Error())
7976
}
80-
// DEBUG
81-
for _, rvs := range ntr.RuleVariations {
82-
s.Senv.Log.Debug().Msgf("New targeting rule variation for flag: %+v", rvs)
83-
}
8477
}
8578
}
8679

0 commit comments

Comments
 (0)