Go command-line options
The following table describes the command-line options that are specifically for translating Go code.
| Go option | Description |
|---|---|
-gotags <go_build_tags>
|
Specifies a comma-separated list of custom build tags for a Go project. This is equivalent to the Equivalent property name:
|
-gopath <dir>
|
Specifies the value of the GOPATH environment variable to use for translating a Go project. If this option is not specified, then OpenText SAST uses the existing value of the GOPATH system environment variable. You must specify the gopath directory as an absolute path. The following examples show valid values for /home/projects/go_workspace/my_proj The following example is an invalid value for go_workspace/my_proj If this option and the GOPATH system environment variable is not set, then the gopath defaults to a subdirectory named When using modules, the GOPATH environment variable is not required to resolve package imports. However, GOPATH still determines the output directory to use when downloading missing module dependencies. Note: OpenText SAST does not fully support older Go projects that rely solely on the GOPATH environment variable to resolve package imports. Equivalent property name:
|
-goroot <dir>
|
Specifies the location of the Go installation. If this option is not specified, the GOROOT system environment variable is used. If this option is not specified and the GOROOT system environment variable is not set, then OpenText SAST uses the Go compiler included in the OpenText SAST installation. Equivalent property name:
|
-goproxy <url>
|
Specifies one or more comma-separated proxy URLs. You can also specify If this option is not specified and the GOPROXY system environment variable is not set, then OpenText SAST uses Equivalent property name:
|
See also