Skip to content

Commit

Permalink
Fix spelling errors in baggage.go (#5120)
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Pająk <[email protected]>
Co-authored-by: Tyler Yahn <[email protected]>
  • Loading branch information
3 people authored Apr 1, 2024
1 parent bddfbc6 commit 2f73208
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions baggage/baggage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2f73208

Please sign in to comment.