MCPcopy
hub / github.com/jackc/pgx / ensureConfig

Method ensureConfig

tracelog/tracelog.go:146–154  ·  view source on GitHub ↗

ensureConfig initializes the Config field with default values if it is nil.

()

Source from the content-addressed store, hash-verified

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

Callers 6

TraceQueryEndMethod · 0.95
TraceBatchEndMethod · 0.95
TraceCopyFromEndMethod · 0.95
TraceConnectEndMethod · 0.95
TracePrepareEndMethod · 0.95
TraceAcquireEndMethod · 0.95

Calls 1

DefaultTraceLogConfigFunction · 0.85

Tested by

no test coverage detected