core/src/main/java/org/owasp/dependencycheck/analyzer/GolangModAnalyzer.java
/**
     * Launches `go list -json -m all` in the given folder.
     *
     * @param folder the working folder
     * @return a reference to the launched process
     * @throws AnalysisException thrown if there is an issue launching `go mod`
     */
Launches `go list -json -m all` in the given folder.
@param folder the working folder
@return a reference to the launched process
@throws AnalysisException thrown if there is an issue launching `go mod`
Launches ` go list - json - m all ` in the given folder . @param folder the working folder @return a reference to the launched process @throws AnalysisException thrown if there is an issue launching ` go mod `
private Process launchGoListAll(File folder) throws AnalysisException {
        if (!folder.isDirectory()) {
            throw new AnalysisException(String.format("%s should have been a directory.", folder.getAbsolutePath()));
        }
        final List<String> args = new ArrayList<>();
        args.add(getGo());
        args.add("list");
        args.add("-json");
        args.add("-m");
        args.add("all");
        final ProcessBuilder builder = new ProcessBuilder(args);
        builder.directory(folder);
        try {
            LOGGER.debug("Launching: {} from {}", args, folder);
            return builder.start();
        } catch (IOException ioe) {
            throw new AnalysisException("go initialization failure; this error can be ignored if you are not analyzing Go. "
                    + "Otherwise ensure that go is installed and the path to go is correctly specified", ioe);
        }
    }
private Process launchGoListAll ( File folder ) throws AnalysisException { if ( ! folder . isDirectory ( ) ) { throw new AnalysisException ( String . format ( "%s should have been a directory." , folder . getAbsolutePath ( ) ) ) ; } final List < String > args = new ArrayList < > ( ) ; args . add ( getGo ( ) ) ; args . add ( "list" ) ; args . add ( "-json" ) ; args . add ( "-m" ) ; args . add ( "all" ) ; final ProcessBuilder builder = new ProcessBuilder ( args ) ; builder . directory ( folder ) ; try { LOGGER . debug ( "Launching: {} from {}" , args , folder ) ; return builder . start ( ) ; } catch ( IOException ioe ) { throw new AnalysisException ( "go initialization failure; this error can be ignored if you are not analyzing Go. " + "Otherwise ensure that go is installed and the path to go is correctly specified" , ioe ) ; } }
Launches `go list -json -m all` in the given folder.
Launches ` go list - json - m all ` in the given folder .