core/src/main/java/org/owasp/dependencycheck/analyzer/GolangModAnalyzer.java
/**
     * Launches `go mod help` to test if go is installed.
     *
     * @param folder the folder location to execute go mode help in
     * @return a reference to the launched process
     * @throws AnalysisException thrown if there is an issue launching `go mod`
     */
Launches `go mod help` to test if go is installed.
@param folder the folder location to execute go mode help in
@return a reference to the launched process
@throws AnalysisException thrown if there is an issue launching `go mod`
Launches ` go mod help ` to test if go is installed . @param folder the folder location to execute go mode help in @return a reference to the launched process @throws AnalysisException thrown if there is an issue launching ` go mod `
private Process testGoMod(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("mod");
        args.add("edit");
        args.add("-json");
        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 testGoMod ( 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 ( "mod" ) ; args . add ( "edit" ) ; args . add ( "-json" ) ; 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 mod help` to test if go is installed.
Launches ` go mod help ` to test if go is installed .