public class GoDriver
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
GoDriver(java.lang.String executablePath,
java.util.Map<java.lang.String,java.lang.String> env,
java.io.File workingDirectory,
org.jfrog.build.api.util.Log logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
get(java.lang.String componentId,
boolean verbose)
Run go get.
|
java.lang.String |
getModuleName() |
org.jfrog.build.extractor.executor.CommandResults |
getUsedModules(boolean verbose,
boolean ignoreErrors,
boolean dontBuildVcs)
If ignoreErrors=false, run:
go list -f "{{with .Module}}{{.Path}} {{.Version}}{{end}}" all
If ignoreErrors=false, run:
go list -e -f "{{with .Module}}{{.Path}} {{.Version}}{{end}}" all
|
boolean |
isInstalled() |
org.jfrog.build.extractor.executor.CommandResults |
modGraph(boolean verbose)
Run go mod graph.
|
void |
modTidy(boolean verbose,
boolean ignoreErrors)
If ignoreErrors=false, run: go mod tidy
If ignoreErrors=true, run: go mod tidy -e
|
org.jfrog.build.extractor.executor.CommandResults |
runCmd(java.util.List<java.lang.String> args,
boolean verbose)
Run go client cmd with goArs.
|
org.jfrog.build.extractor.executor.CommandResults |
runCmd(java.lang.String args,
boolean verbose) |
org.jfrog.build.extractor.executor.CommandResults |
version(boolean verbose) |
public GoDriver(java.lang.String executablePath,
java.util.Map<java.lang.String,java.lang.String> env,
java.io.File workingDirectory,
org.jfrog.build.api.util.Log logger)
public org.jfrog.build.extractor.executor.CommandResults runCmd(java.lang.String args,
boolean verbose)
throws java.io.IOException
java.io.IOExceptionpublic org.jfrog.build.extractor.executor.CommandResults runCmd(java.util.List<java.lang.String> args,
boolean verbose)
throws java.io.IOException
java.io.IOExceptionpublic boolean isInstalled()
public org.jfrog.build.extractor.executor.CommandResults version(boolean verbose)
throws java.io.IOException
java.io.IOExceptionpublic org.jfrog.build.extractor.executor.CommandResults modGraph(boolean verbose)
throws java.io.IOException
verbose - - True if should print the results to the logjava.io.IOException - - in case of any I/O error.public void modTidy(boolean verbose,
boolean ignoreErrors)
throws java.io.IOException
verbose - - True if should print the results to the logignoreErrors - - True if errors should be ignoredjava.io.IOException - - in case of any I/O error.public void get(java.lang.String componentId,
boolean verbose)
throws java.io.IOException
componentId - - Component ID string. ( Example: github.com/jfrog/build-info-go@v1.8.7 )verbose - - True if should print the results to the logjava.io.IOException - - in case of any I/O error.public org.jfrog.build.extractor.executor.CommandResults getUsedModules(boolean verbose,
boolean ignoreErrors,
boolean dontBuildVcs)
throws java.io.IOException
verbose - - True if should print the results to the logignoreErrors - - True if errors should be ignoreddontBuildVcs - - Skip VCS stamping - can be used only on Go later than 1.18java.io.IOException - - in case of any I/O error.public java.lang.String getModuleName()
throws java.io.IOException
java.io.IOException