mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 14:59:58 +00:00
TUN-6130: Fix vendoring due to case sensitive typo in package
This commit is contained in:
41
vendor/go.opentelemetry.io/contrib/propagators/jaeger/context.go
generated
vendored
Normal file
41
vendor/go.opentelemetry.io/contrib/propagators/jaeger/context.go
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
// Copyright The OpenTelemetry Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package jaeger
|
||||
|
||||
import "context"
|
||||
|
||||
type jaegerKeyType int
|
||||
|
||||
const (
|
||||
debugKey jaegerKeyType = iota
|
||||
)
|
||||
|
||||
// withDebug returns a copy of parent with debug set as the debug flag value .
|
||||
func withDebug(parent context.Context, debug bool) context.Context {
|
||||
return context.WithValue(parent, debugKey, debug)
|
||||
}
|
||||
|
||||
// debugFromContext returns the debug value stored in ctx.
|
||||
//
|
||||
// If no debug value is stored in ctx false is returned.
|
||||
func debugFromContext(ctx context.Context) bool {
|
||||
if ctx == nil {
|
||||
return false
|
||||
}
|
||||
if debug, ok := ctx.Value(debugKey).(bool); ok {
|
||||
return debug
|
||||
}
|
||||
return false
|
||||
}
|
Reference in New Issue
Block a user