newOptions initializes the available default options.
(opts ...Option)
| 19 | |
| 20 | // newOptions initializes the available default options. |
| 21 | func newOptions(opts ...Option) Options { |
| 22 | opt := Options{} |
| 23 | |
| 24 | for _, o := range opts { |
| 25 | o(&opt) |
| 26 | } |
| 27 | |
| 28 | return opt |
| 29 | } |
| 30 | |
| 31 | // Logger provides a function to set the logger option. |
| 32 | func Logger(val log.Logger) Option { |