Skip to main content

GoMod

GoMod

The Go Modules package manager for Go.

Configuration

Example

Use the following syntax to configure this plugin globally as part of config.yml:

ort:
analyzer:
packageManagers:
GoMod:
options:
forceDirectGoProxy: true

Use the following syntax to configure this plugin in a repository's .ort.yml:

analyzer:
package_managers:
GoMod:
options:
forceDirectGoProxy: true

If the plugin is configured in both locations, the configurations are merged, with options from .ort.yml taking precedence over those from config.yml.

Options

forceDirectGoProxy

BOOLEAN Default

A flag to indicate whether to disable any proxy when retrieving module information by setting the GOPROXY environment variable to "direct". As many Go proxies do not seem to support the "Origin" property, this helps to ensure getting correct VCS information by going directly to the repositories. However, some projects do not analyze correctly if e.g. tags were removed from repositories. In such cases the proxy should not be disabled to still get cached metadata.