Skip to content

Add Go proxy tag to go-get response

What does this MR do?

If GitLab's response to <instance url>/<project path>?go-get=1 request includes <meta name="go-import" content="<prefix> mod <instance-url>/api/v4/projects/<id>/packages/go" />, Go 1.12+ will fetch from GitLab's Go proxy instead of using git clone. This eliminates the need to configure Go to use the Go proxy.

This MR adds this meta tag to GitLab's go-get response.

See Dependency Management in Go > Fetching Modules for more details.

Follow up to !27746 (merged). Closes #223010.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Rémy Coutable

Merge request reports