From e5391760e6e010558ec7a5f598eb5616164b12c8 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 21 Nov 2023 16:59:57 +0100 Subject: [PATCH] Remove duplicate not found error Signed-off-by: Evan Lezar --- internal/lookup/file.go | 4 ---- internal/lookup/library.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/lookup/file.go b/internal/lookup/file.go index 636ac315..8f330273 100644 --- a/internal/lookup/file.go +++ b/internal/lookup/file.go @@ -17,7 +17,6 @@ package lookup import ( - "errors" "fmt" "os" "path/filepath" @@ -25,9 +24,6 @@ import ( "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" ) -// ErrNotFound indicates that a specified pattern or file could not be found. -var ErrNotFound = errors.New("not found") - // file can be used to locate file (or file-like elements) at a specified set of // prefixes. The validity of a file is determined by a filter function. type file struct { diff --git a/internal/lookup/library.go b/internal/lookup/library.go index 4a6bb722..bdb2248e 100644 --- a/internal/lookup/library.go +++ b/internal/lookup/library.go @@ -83,7 +83,7 @@ func (l ldcacheLocator) Locate(libname string) ([]string, error) { } if len(paths64) == 0 { - return nil, fmt.Errorf("64-bit library %v: %w", libname, errNotFound) + return nil, fmt.Errorf("64-bit library %v: %w", libname, ErrNotFound) } return paths64, nil