Skip to content

Add PushDirCtx and PushFileCtx#20

Merged
prife merged 3 commits intomasterfrom
feature/push-ctx
Sep 10, 2024
Merged

Add PushDirCtx and PushFileCtx#20
prife merged 3 commits intomasterfrom
feature/push-ctx

Conversation

@prife
Copy link
Copy Markdown
Owner

@prife prife commented Aug 31, 2024

No description provided.

sync.go Outdated
case <-ctx.Done():
return fmt.Errorf("push failed by ctx done: %w", ctx.Err())
case err := <-ch:
return fmt.Errorf("push failed: %w", err)
Copy link
Copy Markdown

@HEZI0427 HEZI0427 Sep 2, 2024

Choose a reason for hiding this comment

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

问题同上

select {
case <-ctx.Done():
return fmt.Errorf("push failed by ctx done: %w", ctx.Err())
case err := <-ch:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

如果push成功,即使 err 是空,这里也是反馈错误的 error(预期应该nil)

@prife prife merged commit ed28e82 into master Sep 10, 2024
@prife prife deleted the feature/push-ctx branch September 10, 2024 08:11
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.

2 participants