From b2629b9bfae1afdefd5780d3f47fcc17c956496b Mon Sep 17 00:00:00 2001 From: John Guo Date: Wed, 22 Sep 2021 19:12:31 +0800 Subject: [PATCH] comment update for package gtrace --- net/gtrace/gtrace_carrier.go | 6 +++--- net/gtrace/gtrace_span.go | 2 +- net/gtrace/gtrace_tracer.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/net/gtrace/gtrace_carrier.go b/net/gtrace/gtrace_carrier.go index c378d884f..4cce90236 100644 --- a/net/gtrace/gtrace_carrier.go +++ b/net/gtrace/gtrace_carrier.go @@ -14,7 +14,7 @@ import ( // Carrier is the storage medium used by a TextMapPropagator. type Carrier map[string]interface{} -// NewCarrier . +// NewCarrier creates and returns a Carrier. func NewCarrier(data ...map[string]interface{}) Carrier { if len(data) > 0 && data[0] != nil { return data[0] @@ -50,12 +50,12 @@ func (c Carrier) MustMarshal() []byte { return b } -// String . +// String converts and returns current Carrier as string. func (c Carrier) String() string { return string(c.MustMarshal()) } -// UnmarshalJSON . +// UnmarshalJSON implements interface UnmarshalJSON for package json. func (c Carrier) UnmarshalJSON(b []byte) error { carrier := NewCarrier(nil) return json.UnmarshalUseNumber(b, carrier) diff --git a/net/gtrace/gtrace_span.go b/net/gtrace/gtrace_span.go index 40d1c7b33..0d7fb240b 100644 --- a/net/gtrace/gtrace_span.go +++ b/net/gtrace/gtrace_span.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/otel/trace" ) -// Span 。 +// Span warps trace.Span for compatibility and extension. type Span struct { trace.Span } diff --git a/net/gtrace/gtrace_tracer.go b/net/gtrace/gtrace_tracer.go index da693df11..47d2baa72 100644 --- a/net/gtrace/gtrace_tracer.go +++ b/net/gtrace/gtrace_tracer.go @@ -11,7 +11,7 @@ import ( "go.opentelemetry.io/otel/trace" ) -// Tracer . +// Tracer warps trace.Tracer for compatibility and extension. type Tracer struct { trace.Tracer }