Including custom Go build tags
If your Go project includes files that require custom build tags, then you can include these build tags in the OpenText SAST translation using the -gotags option. For example:
sourceanalyzer -b MyProject -gotags release "src/**/*.go"
The OpenText SAST -gotags option does not allow you to override automatic build tags for the operating system, architecture, or Go version (for example, //go:build linux, //go:build arm, //go:build go1.21). To translate your Go project for a different operating system or architecture, set the appropriate cross-compile targets in the GOOS and GOARCH environment variables. To set a specific Go version, specify the path for the Go SDK version in the GOROOT environment variable or the -goroot option.