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

Implement ReporterFunc, LoggerFunc, and others #249

Closed
gavv opened this issue Jan 28, 2023 · 2 comments
Closed

Implement ReporterFunc, LoggerFunc, and others #249

gavv opened this issue Jan 28, 2023 · 2 comments
Assignees
Labels
feature New feature or request good first issue Good for newcomers help wanted Contributions are welcome
Milestone

Comments

@gavv
Copy link
Owner

gavv commented Jan 28, 2023

We have several single method interfaces in expect.go:

  • RequestFactory
  • Client
  • WebsocketDialer
  • Reporter
  • Logger

It would be convenient to provide an implementation for each of them similar to http.HandlerFunc, so that the user does not need to create a struct in sample cases.

For example, for Reporter we can provide ReporterFunc that is a wrapper for func (message string, args ...interface{}).

We can place each implementation right after corresponding interface in expect.go. Each one should have a documentation comment with code example that demonstrates how to use it with WithConfig. Each one also should be covered by unit test.

@gavv gavv added feature New feature or request help wanted Contributions are welcome good first issue Good for newcomers labels Jan 28, 2023
@L-block
Copy link
Contributor

L-block commented Mar 6, 2023

hello, can you assign this one to me?

@gavv
Copy link
Owner Author

gavv commented Mar 6, 2023

Sure, thanks!

@gavv gavv closed this as completed Mar 22, 2023
@gavv gavv added this to the v2 milestone Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers help wanted Contributions are welcome
Projects
None yet
Development

No branches or pull requests

2 participants