(config *Config)
| 8 | } |
| 9 | |
| 10 | func NewFactory(config *Config) (*Factory, error) { |
| 11 | if err := config.Validate(); err != nil { |
| 12 | return nil, err |
| 13 | } |
| 14 | |
| 15 | return &Factory{config}, nil |
| 16 | } |
| 17 | |
| 18 | // NewWriter wraps [http.ResponseWriter] into [Writer]. |
| 19 | func (f *Factory) NewWriter(rw http.ResponseWriter) *Writer { |