[no-relnote] Fix QF1008: could remove embedded field lint errors

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2025-04-02 14:10:33 +02:00
parent bee1969bbf
commit c1c6534b1f
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ func WithDriverDotSoSymlinks(mounts Discover, version string, nvidiaCDIHookPath
// Hooks returns a hook to create the additional symlinks based on the mounts.
func (d *additionalSymlinks) Hooks() ([]Hook, error) {
mounts, err := d.Discover.Mounts()
mounts, err := d.Mounts()
if err != nil {
return nil, fmt.Errorf("failed to get library mounts: %v", err)
}

View File

@ -61,11 +61,11 @@ func (s *memorySpec) Modify(m SpecModifier) error {
// Otherwise the returned value will be empty and the boolean will
// be false.
func (s memorySpec) LookupEnv(key string) (string, bool) {
if s.Spec == nil || s.Spec.Process == nil {
if s.Spec == nil || s.Process == nil {
return "", false
}
for _, env := range s.Spec.Process.Env {
for _, env := range s.Process.Env {
if !strings.HasPrefix(env, key) {
continue
}

View File

@ -160,7 +160,7 @@ func TestModify(t *testing.T) {
require.EqualValues(t, &specs.Spec{}, spec.Spec, "%d: %v", i, tc)
default:
require.NoError(t, err, "%d: %v", i, tc)
require.Equal(t, "updated", spec.Spec.Version, "%d: %v", i, tc)
require.Equal(t, "updated", spec.Version, "%d: %v", i, tc)
}
}
}