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
Introduce SpanComplete instead SpanError&SpanSuccess #132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I have just marked a few defer that are unneeded, but there is not for defers at all. It has a performance cost and no gain at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, like mentioned before defer is usually used to cleanup resources(file close) or handle panics with recover.
I have added two suggestions which makes the code much simple should be fixed.
The same pattern applies to all the rest of the code and should be applied ther as well.
Which problem is this PR solving?
Resolves #123
Short description of the changes
As mentioned in the issue referenced, SpanSuccess and SpanError are used seperately. Instead using these, introducing SpanComplete makes code simpler. This PR is the change of this refactoring.