From ca74e83a82f71d16ca10374f4484fa99eab0948a Mon Sep 17 00:00:00 2001 From: quobix Date: Fri, 9 Feb 2024 10:04:17 -0500 Subject: [PATCH] cleaned up some dead code! Signed-off-by: quobix --- index/find_component.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/index/find_component.go b/index/find_component.go index ed8cedbc..5af786cf 100644 --- a/index/find_component.go +++ b/index/find_component.go @@ -111,24 +111,8 @@ func (index *SpecIndex) lookupRolodex(uri []string) *Reference { file := strings.ReplaceAll(uri[0], "file:", "") var absoluteFileLocation, fileName string - - // is this a local or a remote file? fileName = filepath.Base(file) - if filepath.IsAbs(file) || strings.HasPrefix(file, "http") { - absoluteFileLocation = file - } else { - if index.specAbsolutePath != "" { - if index.config.BaseURL == nil { - - // consider the file local - dir := filepath.Dir(index.config.SpecAbsolutePath) - if !strings.HasPrefix(file, ".") { - file = fmt.Sprintf("./%s", file) - } - absoluteFileLocation, _ = filepath.Abs(filepath.Join(dir, file)) - } - } - } + absoluteFileLocation = file // if the absolute file location has no file ext, then get the rolodex root. ext := filepath.Ext(absoluteFileLocation)