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: add a handler unit test for upstream and remove init #840

Merged
merged 1 commit into from
Nov 20, 2020

Conversation

ShiningRush
Copy link
Contributor

This pr is a demo about how to do a real unit test in handler.
I also remove the init in conf and log, go is recommended to use explicit initial function instead of implicit init

@ShiningRush ShiningRush merged commit 8a1da59 into apache:v2.0 Nov 20, 2020
@ShiningRush
Copy link
Contributor Author

Oh,it is automatically merged?what happened...
Maybe my misoperation : (

@moonming
Copy link
Member

please revert it

@tokers tokers changed the title feat: add a hanlder unit test for upstream and remove init feat: add a handler unit test for upstream and remove init Nov 21, 2020
@@ -19,6 +19,10 @@ package consumer

import (
"encoding/json"
"fmt"
"github.com/shiningrush/droplet/data"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to keep the convention about import: the first part is all standard libs, the second part is your local packages in your go module, and the last part is all third party packages.

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