Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Scherba <[email protected]>
  • Loading branch information
miklezzzz committed Oct 17, 2024
1 parent 8cca014 commit b9bce8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/helm_resources_manager/helm_resources_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ type helmResourcesManager struct {
var _ HelmResourcesManager = &helmResourcesManager{}

func NewHelmResourcesManager(ctx context.Context, kclient *klient.Client) (HelmResourcesManager, error) {
//nolint:govet
cctx, cancel := context.WithCancel(ctx)
if kclient == nil {
return nil, fmt.Errorf("kube client not set")

Check failure on line 55 in pkg/helm_resources_manager/helm_resources_manager.go

View workflow job for this annotation

GitHub Actions / Run Go linters

lostcancel: this return statement may be reached without using the cancel var defined on line 53 (govet)
}
Expand All @@ -65,7 +67,6 @@ func NewHelmResourcesManager(ctx context.Context, kclient *klient.Client) (HelmR
return nil, err
}

cctx, cancel := context.WithCancel(ctx)
go cache.Start(cctx)
log.Debug("Helm resource manager: cache's been started")
if synced := cache.WaitForCacheSync(cctx); !synced {
Expand Down

0 comments on commit b9bce8d

Please sign in to comment.