Skip to content

feat: golang module support pseudo version#8293

Merged
olblak merged 3 commits intoupdatecli:mainfrom
olblak:feat/golang/support_pseudoversion
Apr 5, 2026
Merged

feat: golang module support pseudo version#8293
olblak merged 3 commits intoupdatecli:mainfrom
olblak:feat/golang/support_pseudoversion

Conversation

@olblak
Copy link
Copy Markdown
Member

@olblak olblak commented Apr 3, 2026

Support pseudo version such as github.com/shurcooL/githubv4 v0.0.0-20230215024106-420ad0987b9b for golang module

Test

To test this pull request, you can run the following commands:

pkg/plugins/resources/go/module/
go test

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

Potential improvement

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added enhancement New feature or request go Pull requests that update Go code labels Apr 3, 2026
@olblak olblak requested a review from Copilot April 3, 2026 17:43
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 extends the Go module resource to better handle modules that don’t publish tagged versions by falling back to Go proxy pseudo-versions (via @latest) when using “latest”-style filters, and updates the condition check to query specific versions via the Go proxy .info endpoint.

Changes:

  • Refactors proxy version retrieval into helper functions and trims/normalizes list responses.
  • Adds @latest JSON parsing to support pseudo-version fallback when no versions are published.
  • Updates Condition to check for a specific version using @v/<version>.info instead of scanning the full version list.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 10 comments.

File Description
pkg/plugins/resources/go/module/version.go Adds proxy helpers and @latest fallback logic to return pseudo-versions when no tagged versions exist.
pkg/plugins/resources/go/module/condition.go Switches condition checks to use the proxy .info endpoint per version and aligns GOPROXY resolution logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

olblak and others added 2 commits April 5, 2026 12:54
* use constant for version filter kind
* trimspace around proxy
* handle correctly http error

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak enabled auto-merge (squash) April 5, 2026 11:12
@olblak olblak merged commit c2c6f29 into updatecli:main Apr 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants