Skip to content

Commit

Permalink
cleaned up some dead code!
Browse files Browse the repository at this point in the history
Signed-off-by: quobix <[email protected]>
  • Loading branch information
daveshanley committed Feb 9, 2024
1 parent 6c8e03d commit ca74e83
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions index/find_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ca74e83

Please sign in to comment.