1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +02:00

docs: unify doc comments for functions returning bool (#7064)

Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7063

If also fixes Go Doc comment for `SpanID.IsEmpty`.

The pattern is based on the way the Go standard library documents
functions returning a boolean.
This commit is contained in:
Robert Pająk
2025-07-23 07:58:50 +02:00
committed by GitHub
parent 50868ef62e
commit 1737ab8666
21 changed files with 42 additions and 41 deletions

View File

@@ -167,7 +167,7 @@ func (s *recordingSpan) SpanContext() trace.SpanContext {
return s.spanContext
}
// IsRecording returns if this span is being recorded. If this span has ended
// IsRecording reports whether this span is being recorded. If this span has ended
// this will return false.
func (s *recordingSpan) IsRecording() bool {
if s == nil {
@@ -179,7 +179,7 @@ func (s *recordingSpan) IsRecording() bool {
return s.isRecording()
}
// isRecording returns if this span is being recorded. If this span has ended
// isRecording reports whether this span is being recorded. If this span has ended
// this will return false.
//
// This method assumes s.mu.Lock is held by the caller.