upstream sync

This commit is contained in:
Senad Uka
2023-10-12 05:23:34 +02:00
parent d3011d77ff
commit 7369739bdd
21 changed files with 1686 additions and 85 deletions

View File

@@ -0,0 +1,22 @@
package mapbox
import (
"context"
)
type Logger interface {
Debugf(msg string, params ...interface{})
Errorf(msg string, params ...interface{})
}
// withLogger helps to reduce unnecessary allocations
func (c *config) withLogger(ctx context.Context, do func(Logger)) {
if c.requestLogger != nil {
do(c.requestLogger(ctx))
return
}
if c.logger != nil {
do(c.logger)
}
}