After reading notes from Peter's talk I like the idea of using a config object where consumers of the library can override the defaults. https://peter.bourgon.org/go-best-practices-2016/#configuration
10 lines
123 B
Go
10 lines
123 B
Go
package connector
|
|
|
|
import (
|
|
"github.com/apex/log"
|
|
)
|
|
|
|
type Config struct {
|
|
MaxBatchCount int
|
|
LogHandler log.Handler
|
|
}
|