cleaning up unreachable code.

Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2023-11-02 15:33:05 -04:00
parent 713aeecdfa
commit 78763fd48b

View File

@@ -110,18 +110,12 @@ func LocateRefNodeWithContext(ctx context.Context, root *yaml.Node, idx *index.S
} else {
if specPath != "" {
var abs string
// multi file ref, looking for the root.
if filepath.Base(specPath) == "root.yaml" && explodedRefValue[0] == "" {
if explodedRefValue[0] == "" {
abs = specPath
} else {
if explodedRefValue[0] == "" {
abs = specPath
} else {
abs, _ = filepath.Abs(filepath.Join(filepath.Dir(specPath), explodedRefValue[0]))
}
abs, _ = filepath.Abs(filepath.Join(filepath.Dir(specPath), explodedRefValue[0]))
}
rv = fmt.Sprintf("%s#%s", abs, explodedRefValue[1])
} else {
// check for a config baseURL and use that if it exists.