1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-04 09:43:23 +02:00

Unslice to simplify (#324)

This commit is contained in:
ferhat elmas 2019-11-18 19:47:04 +01:00 committed by Joshua MacDonald
parent 90ba74e15a
commit eb3b31e12d
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ func decodeHex(h string, b []byte) error {
return err return err
} }
copy(b[:], decoded) copy(b, decoded)
return nil return nil
} }

View File

@ -126,7 +126,7 @@ func (hp HTTPTraceContextPropagator) extractSpanContext(
if len(sections[2]) != 16 { if len(sections[2]) != 16 {
return core.EmptySpanContext() return core.EmptySpanContext()
} }
sc.SpanID, err = core.SpanIDFromHex(sections[2][:]) sc.SpanID, err = core.SpanIDFromHex(sections[2])
if err != nil { if err != nil {
return core.EmptySpanContext() return core.EmptySpanContext()
} }