-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Go: Support git_source
#20368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Go: Support git_source
#20368
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for git_source
type registry configurations in the Go extractor's proxy handling functionality. The change extends the existing registry proxy system to handle Git sources alongside the existing goproxy server support.
- Adds
git_source
type support to registry configurations - Updates proxy environment variable handling to process Git sources
- Adds comprehensive test coverage for multiple registry configurations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
go/extractor/util/registryproxy.go | Adds git_source constant, refactors data structures to separate goproxy servers and Git sources, and updates environment variable handling logic |
go/extractor/util/registryproxy_test.go | Adds new test function to verify parsing of multiple registry configurations including both git_source and goproxy_server types |
multiple := parseRegistryConfigsSuccess(t, "[{ \"type\": \"git_source\", \"url\": \"https://github.com/github\" }, { \"type\": \"goproxy_server\", \"url\": \"https://proxy.example.com/mod\" }]") | ||
|
||
if len(multiple) != 2 { | ||
t.Fatalf("Expected `parseRegistryConfigs` to return two configuration, but got %d.", len(multiple)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message contains a grammatical error. 'two configuration' should be 'two configurations'.
t.Fatalf("Expected `parseRegistryConfigs` to return two configuration, but got %d.", len(multiple)) | |
t.Fatalf("Expected `parseRegistryConfigs` to return two configurations, but got %d.", len(multiple)) |
Copilot uses AI. Check for mistakes.
6576e3b
to
35ff9fd
Compare
Since `GOPRIVATE` / `GONOPROXY` expect a glob pattern
35ff9fd
to
cb7a155
Compare
No description provided.