diff --git a/internal/lookup/file.go b/internal/lookup/file.go index 1283f0ae..ab52d03d 100644 --- a/internal/lookup/file.go +++ b/internal/lookup/file.go @@ -28,7 +28,6 @@ import ( // prefixes. The validity of a file is determined by a filter function. type file struct { logger *log.Logger - root string prefixes []string filter func(string) error } @@ -78,15 +77,6 @@ func (p file) Locate(pattern string) ([]string, error) { return filenames, nil } -// Relative returns the path relative to the root for the file locator -func (p file) Relative(path string) (string, error) { - if p.root == "" || p.root == "/" { - return path, nil - } - - return filepath.Rel(p.root, path) -} - // assertFile checks whether the specified path is a regular file func assertFile(filename string) error { info, err := os.Stat(filename) diff --git a/internal/lookup/locator.go b/internal/lookup/locator.go index 76ade332..871e1b02 100644 --- a/internal/lookup/locator.go +++ b/internal/lookup/locator.go @@ -21,5 +21,4 @@ package lookup // Locator defines the interface for locating files on a system. type Locator interface { Locate(string) ([]string, error) - Relative(string) (string, error) }