Implement go.mod viewer
What does this MR do?
Implements a blob viewer and dependency linker for go.mod
files:
- Adds
BlobViewer::GoMod < DependencyManager
- Adds
GitLab::DependencyLinker::GoModLinker < BaseLinker
- Define types for
go.mod
andgo.sum
inGitLab::FileDetector
- Adds
GoMod
toBlob::AUXILIARY_VIEWERS
andGoModLinker
toGitlab::DependencyLinker::LINKERS
Closes #212708 (closed)
- [go.mod, go.sum] " This project manages its dependencies using Go Modules. Learn more" will be shown under the commit info.
- [go.mod, go.sum] Packages hosted on the instance will link to the project
- For example, on GitLab.com,
module gitlab.com/gitlab-org/gitaly
will link to https://gitlab.com/gitlab-org/gitaly
- For example, on GitLab.com,
- [go.mod, go.sum] Packages not hosted on the instance will link to a specific version on pkg.go.dev
- For example, on example.com,
requires gitlab.com/rigel314/pakparse v0.1.0
will link to https://pkg.go.dev/gitlab.com/rigel314/pakparse@v0.1.0
- For example, on example.com,
- [go.sum] Checksums will link to sum.golang.org
- For example, the checksum in
gitlab.com/rigel314/pakparse v0.1.0 h1:rX1X0Woi0Cei2otdqlJNwVY3qdsKKHSvTWOR6jyh2jo=
will link to https://sum.golang.org/lookup/gitlab.com/rigel314/pakparse@v0.1.0
- For example, the checksum in
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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