Skip to content

golang: add golang downloader#194

Open
Paulkm2006 wants to merge 4 commits intotuna:masterfrom
Paulkm2006:feat/golang
Open

golang: add golang downloader#194
Paulkm2006 wants to merge 4 commits intotuna:masterfrom
Paulkm2006:feat/golang

Conversation

@Paulkm2006
Copy link

This PR implements a golang downloader, which retrieves all versions and download links from the golang official website https://go.dev/dl/ , and download them concurrently.

Copilot AI review requested due to automatic review settings March 6, 2026 12:22
Copy link

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

Adds a new golang.py mirror sync script intended to fetch Go release metadata from go.dev and download artifacts concurrently into a local working directory (tunasync-style).

Changes:

  • Introduces RemoteSite + GoRelease modeling to enumerate Go release artifacts from go.dev.
  • Adds a threaded download worker queue with optional include/exclude filtering and SHA256 verification.
  • Implements a local cleanup step to delete files not present in the computed upstream file list.

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

You can also share your feedback on Copilot code review. Take the survey.

Paulkm2006 and others added 2 commits March 6, 2026 20:28
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
golang.py Outdated
def _fetch_releases(self):
"""Fetch releases from the JSON API or HTML page."""

# self._fetch_from_json()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只从 JSON 获取 stable (supported) release 是有必要的,因为对于空间紧张的镜像站来说,很多时候不希望同步的仓库大小是无限增长的。另外对于只获取 stable release 的情况,可能还需要移除上游已经去除的文件。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改。移除文件的逻辑位于 R317-R326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants