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

sender: fix SkipDeepCopySender check not working #609

Merged
merged 1 commit into from
Jul 17, 2018
Merged

sender: fix SkipDeepCopySender check not working #609

merged 1 commit into from
Jul 17, 2018

Conversation

unknwon
Copy link
Contributor

@unknwon unknwon commented Jul 17, 2018

优化 SkipDeepCopySender 的接口实现判断

@unknwon unknwon requested a review from wonderflow July 17, 2018 12:29
func (ft *FtSender) SkipDeepCopy() bool {
_, ok := ft.innerSender.(SkipDeepCopySender)
return ok
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

fault_tolerant_test.go里可以加个测试,true和false都可以测到。pandora_sender应该就是return false的情况,mock sender就是return true的情况

Copy link
Contributor Author

Choose a reason for hiding this comment

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

加好了

@redHJ
Copy link
Collaborator

redHJ commented Jul 17, 2018

lgtm

func (_ *FtSender) SkipDeepCopy() {}
func (ft *FtSender) SkipDeepCopy() bool {
_, ok := ft.innerSender.(SkipDeepCopySender)
return ok
Copy link
Contributor

Choose a reason for hiding this comment

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

ss, ok := ft.innerSender.(SkipDeepCopySender)
if ok{
return ss. SkipDeepCopy()
}
return false

@wonderflow wonderflow merged commit 096fcd7 into qiniu:master Jul 17, 2018
@unknwon unknwon deleted the fix-skip-deep-copy-sender branch July 18, 2018 02:06
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