remove deprecated entities (#220)

This commit is contained in:
Alessandro Ros
2023-03-31 12:42:50 +02:00
committed by GitHub
parent 04f5a4041c
commit 71ce818c97
3 changed files with 0 additions and 35 deletions

View File

@@ -225,10 +225,6 @@ type Client struct {
OnRequest func(*base.Request)
// called after every response.
OnResponse func(*base.Response)
// Deprecated. replaced by Log.
OnWarning func(error)
// Deprecated. replaced by Log.
OnDecodeError func(error)
//
// logging (all optional)
@@ -339,16 +335,6 @@ func (c *Client) Start(scheme string, host string) error {
c.OnResponse = func(*base.Response) {
}
}
if c.OnDecodeError != nil {
c.Log = func(level LogLevel, format string, args ...interface{}) {
c.OnDecodeError(fmt.Errorf(format, args...))
}
}
if c.OnWarning != nil {
c.Log = func(level LogLevel, format string, args ...interface{}) {
c.OnDecodeError(fmt.Errorf(format, args...))
}
}
if c.Log == nil {
c.Log = defaultLog