// Copyright The OpenTelemetry Authors// SPDX-License-Identifier: Apache-2.0package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"import ()// protoInt64 represents the protobuf encoding of integers which can be either// strings or integers.type protoInt64 int64// Int64 returns the protoInt64 as an int64.func ( *protoInt64) () int64 { returnint64(*) }// UnmarshalJSON decodes both strings and integers.func ( *protoInt64) ( []byte) error {if [0] == '"' {varstringif := json.Unmarshal(, &); != nil {return } , := strconv.ParseInt(, 10, 64)if != nil {return } * = protoInt64() } else {varint64if := json.Unmarshal(, &); != nil {return } * = protoInt64() }returnnil}// protoUint64 represents the protobuf encoding of integers which can be either// strings or integers.type protoUint64 uint64// Int64 returns the protoUint64 as a uint64.func ( *protoUint64) () uint64 { returnuint64(*) }// UnmarshalJSON decodes both strings and integers.func ( *protoUint64) ( []byte) error {if [0] == '"' {varstringif := json.Unmarshal(, &); != nil {return } , := strconv.ParseUint(, 10, 64)if != nil {return } * = protoUint64() } else {varuint64if := json.Unmarshal(, &); != nil {return } * = protoUint64() }returnnil}
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.