mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-01 06:50:00 +00:00
c097745c38
Bumps [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) from 1.24.0 to 1.25.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
45 lines
754 B
Go
45 lines
754 B
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package internal // import "go.opentelemetry.io/otel/internal"
|
|
|
|
import (
|
|
"math"
|
|
"unsafe"
|
|
)
|
|
|
|
func BoolToRaw(b bool) uint64 { // nolint:revive // b is not a control flag.
|
|
if b {
|
|
return 1
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func RawToBool(r uint64) bool {
|
|
return r != 0
|
|
}
|
|
|
|
func Int64ToRaw(i int64) uint64 {
|
|
return uint64(i)
|
|
}
|
|
|
|
func RawToInt64(r uint64) int64 {
|
|
return int64(r)
|
|
}
|
|
|
|
func Float64ToRaw(f float64) uint64 {
|
|
return math.Float64bits(f)
|
|
}
|
|
|
|
func RawToFloat64(r uint64) float64 {
|
|
return math.Float64frombits(r)
|
|
}
|
|
|
|
func RawPtrToFloat64Ptr(r *uint64) *float64 {
|
|
return (*float64)(unsafe.Pointer(r))
|
|
}
|
|
|
|
func RawPtrToInt64Ptr(r *uint64) *int64 {
|
|
return (*int64)(unsafe.Pointer(r))
|
|
}
|