Skip to content

Implement ReporterFunc, LoggerFunc, and others #249

@gavv

Description

@gavv

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions