MCPcopy Create free account
hub / github.com/cli/cli / Record

Method Record

internal/telemetry/telemetry.go:279–287  ·  view source on GitHub ↗

Record copies a complete event into the service. Recording after Finish has no effect.

(event ghtelemetry.Event)

Source from the content-addressed store, hash-verified

277// Record copies a complete event into the service.
278// Recording after Finish has no effect.
279func (s *service) Record(event ghtelemetry.Event) {
280 s.mu.Lock()
281 defer s.mu.Unlock()
282
283 if s.finished {
284 return
285 }
286 s.events = append(s.events, &recordedEvent{event: cloneEvent(event), recordedAt: time.Now()})
287}
288
289// Begin copies an event's initial facts and returns a handle for adding
290// facts until Finish. Events begun after Finish are not recorded.

Callers

nothing calls this directly

Calls 1

cloneEventFunction · 0.85

Tested by

no test coverage detected