use of com.synopsys.integration.detectable.detectables.go.vendor.parse.GoVendorJsonParser in project synopsys-detect by blackducksoftware.
the class GoVendorExtractor method extract.
public Extraction extract(File vendorJsonFile) {
try {
GoVendorJsonParser vendorJsonParser = new GoVendorJsonParser(externalIdFactory);
String vendorJsonContents = FileUtils.readFileToString(vendorJsonFile, StandardCharsets.UTF_8);
logger.debug(vendorJsonContents);
DependencyGraph dependencyGraph = vendorJsonParser.parseVendorJson(gson, vendorJsonContents);
CodeLocation codeLocation = new CodeLocation(dependencyGraph);
return new Extraction.Builder().success(codeLocation).build();
} catch (Exception e) {
return new Extraction.Builder().exception(e).build();
}
}
Aggregations