ensureConfig initializes the Config field with default values if it is nil.
()
| 144 | |
| 145 | // ensureConfig initializes the Config field with default values if it is nil. |
| 146 | func (tl *TraceLog) ensureConfig() { |
| 147 | tl.ensureConfigOnce.Do( |
| 148 | func() { |
| 149 | if tl.Config == nil { |
| 150 | tl.Config = DefaultTraceLogConfig() |
| 151 | } |
| 152 | }, |
| 153 | ) |
| 154 | } |
| 155 | |
| 156 | type ctxKey int |
| 157 |
no test coverage detected