1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-08-10 22:31:50 +02:00

Use gofumpt instead of gofmt (#4623)

* Use gofumpt instead of gofmt in golangci-lint conf

* Run gofumpt fixes

* Format generated templates

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
This commit is contained in:
Tyler Yahn
2023-10-16 10:02:21 -07:00
committed by GitHub
parent 9900450477
commit 5dff273a1e
73 changed files with 255 additions and 209 deletions

View File

@@ -27,9 +27,7 @@ import (
type ctxKeyType uint
var (
ctxKey ctxKeyType
)
var ctxKey ctxKeyType
type carrier []string

View File

@@ -40,8 +40,10 @@ const (
// their proprietary information.
type TraceContext struct{}
var _ TextMapPropagator = TraceContext{}
var traceCtxRegExp = regexp.MustCompile("^(?P<version>[0-9a-f]{2})-(?P<traceID>[a-f0-9]{32})-(?P<spanID>[a-f0-9]{16})-(?P<traceFlags>[a-f0-9]{2})(?:-.*)?$")
var (
_ TextMapPropagator = TraceContext{}
traceCtxRegExp = regexp.MustCompile("^(?P<version>[0-9a-f]{2})-(?P<traceID>[a-f0-9]{32})-(?P<spanID>[a-f0-9]{16})-(?P<traceFlags>[a-f0-9]{2})(?:-.*)?$")
)
// Inject set tracecontext from the Context into the carrier.
func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) {