client: Allow setting zap logger in config

This commit is contained in:
Marek Siarkowicz
2021-05-11 16:02:37 +02:00
parent 7ae55cf981
commit 06afe87b34
11 changed files with 26 additions and 26 deletions

View File

@ -29,11 +29,8 @@ import (
)
func NewClient(t *testing.T, cfg Config) (*Client, error) {
client, err := New(cfg)
if err != nil {
return nil, err
}
return client.WithLogger(zaptest.NewLogger(t)), nil
cfg.Logger = zaptest.NewLogger(t)
return New(cfg)
}
func TestDialCancel(t *testing.T) {