Skip to content
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

feat(display): add progress #6

Merged
merged 1 commit into from Aug 24, 2022
Merged

feat(display): add progress #6

merged 1 commit into from Aug 24, 2022

Conversation

mar-heaven
Copy link
Contributor

No description provided.

utils/wget.go Outdated Show resolved Hide resolved
utils/wget.go Outdated
@@ -43,8 +57,12 @@ func WgetBinary(url string, downloadTo string, headers map[string]string) error
if len(resp.Header["Content-Type"]) > 0 && strings.Contains(resp.Header["Content-Type"][0], "text") {
return errors.New("target is not a binary")
}

_, err = io.Copy(out, resp.Body)
reader := &ProgressReader{
Copy link
Owner

Choose a reason for hiding this comment

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

下面的 DownloadBinaryWithTCP 可以顺便支持一下吗?这样就统一了

@mar-heaven
Copy link
Contributor Author

mar-heaven commented Aug 24, 2022 via email

utils/wget.go Outdated Show resolved Hide resolved
@foamzou
Copy link
Owner

foamzou commented Aug 24, 2022

Thanks bro @mar-heaven

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.

None yet

2 participants