mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-12-26 21:05:00 +02:00
Fix spelling errors in baggage.go (#5120)
Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
parent
bddfbc68ca
commit
2f73208044
@ -56,10 +56,10 @@ func NewKeyProperty(key string) (Property, error) {
|
||||
// NewKeyValueProperty returns a new Property for key with value.
|
||||
//
|
||||
// The passed key must be compliant with W3C Baggage specification.
|
||||
// The passed value must be precent-encoded as defined in W3C Baggage specification.
|
||||
// The passed value must be percent-encoded as defined in W3C Baggage specification.
|
||||
//
|
||||
// Notice: Consider using [NewKeyValuePropertyRaw] instead
|
||||
// that does not require precent-encoding of the value.
|
||||
// that does not require percent-encoding of the value.
|
||||
func NewKeyValueProperty(key, value string) (Property, error) {
|
||||
if !validateValue(value) {
|
||||
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
||||
@ -224,10 +224,10 @@ type Member struct {
|
||||
// NewMemberRaw returns a new Member from the passed arguments.
|
||||
//
|
||||
// The passed key must be compliant with W3C Baggage specification.
|
||||
// The passed value must be precent-encoded as defined in W3C Baggage specification.
|
||||
// The passed value must be percent-encoded as defined in W3C Baggage specification.
|
||||
//
|
||||
// Notice: Consider using [NewMemberRaw] instead
|
||||
// that does not require precent-encoding of the value.
|
||||
// that does not require percent-encoding of the value.
|
||||
func NewMember(key, value string, props ...Property) (Member, error) {
|
||||
if !validateValue(value) {
|
||||
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
||||
@ -298,7 +298,7 @@ func parseMember(member string) (Member, error) {
|
||||
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, v)
|
||||
}
|
||||
|
||||
// Decode a precent-encoded value.
|
||||
// Decode a percent-encoded value.
|
||||
value, err := url.PathUnescape(val)
|
||||
if err != nil {
|
||||
return newInvalidMember(), fmt.Errorf("%w: %v", errInvalidValue, err)
|
||||
@ -605,7 +605,7 @@ func parsePropertyInternal(s string) (p Property, ok bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// Decode a precent-encoded value.
|
||||
// Decode a percent-encoded value.
|
||||
value, err := url.PathUnescape(s[valueStart:valueEnd])
|
||||
if err != nil {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user