From c1e2294b924a45422367068e29cca28c59d09e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Tue, 3 Sep 2024 23:39:44 -0400 Subject: [PATCH] global: Fix golangci-lint errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- managers/manager.go | 2 +- shared/chroot.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/managers/manager.go b/managers/manager.go index 82129f6e..acd3d6a6 100644 --- a/managers/manager.go +++ b/managers/manager.go @@ -167,7 +167,7 @@ func (m *Manager) ManagePackages(imageTarget shared.ImageTarget) error { func (m *Manager) ManageRepositories(imageTarget shared.ImageTarget) error { var err error - if m.def.Packages.Repositories == nil || len(m.def.Packages.Repositories) == 0 { + len(m.def.Packages.Repositories) == 0 { return nil } diff --git a/shared/chroot.go b/shared/chroot.go index 91053ab2..de14eea9 100644 --- a/shared/chroot.go +++ b/shared/chroot.go @@ -273,7 +273,7 @@ func SetupChroot(rootfs string, definition Definition, m []ChrootMount) (func() } } - if envs.EnvVariables != nil && len(envs.EnvVariables) > 0 { + if len(envs.EnvVariables) > 0 { imageTargets := ImageTargetUndefined | ImageTargetAll if definition.Targets.Type == DefinitionFilterTypeContainer {