options applies the options on the config object.
(opts ...Option)
| 143 | |
| 144 | // options applies the options on the config object. |
| 145 | func (c *config) options(opts ...Option) { |
| 146 | for _, opt := range opts { |
| 147 | opt(c) |
| 148 | } |
| 149 | if c.debug { |
| 150 | c.driver = dialect.Debug(c.driver, c.log) |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | // Debug enables debug logging on the ent.Driver. |
| 155 | func Debug() Option { |