options applies the options on the config object.
(opts ...Option)
| 106 | |
| 107 | // options applies the options on the config object. |
| 108 | func (c *config) options(opts ...Option) { |
| 109 | for _, opt := range opts { |
| 110 | opt(c) |
| 111 | } |
| 112 | if c.debug { |
| 113 | c.driver = dialect.Debug(c.driver, c.log) |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | // Debug enables debug logging on the ent.Driver. |
| 118 | func Debug() Option { |