Skip to content

Commit 5970fd4

Browse files
committed
rename GetAll to Values as suggested
1 parent 4cffc3c commit 5970fd4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

propagation/baggage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func extractSingleBaggage(parent context.Context, carrier TextMapCarrier) contex
5555
}
5656

5757
func extractMultiBaggage(parent context.Context, carrier MultiTextMapCarrier) context.Context {
58-
bVals := carrier.GetAll(baggageHeader)
58+
bVals := carrier.Values(baggageHeader)
5959
members := make([]baggage.Member, 0)
6060
for _, bStr := range bVals {
6161
currBag, err := baggage.Parse(bStr)

propagation/propagation.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ type MultiTextMapCarrier interface {
3838
// MultiGetter can return multiple values for a single key,
3939
// with contrast to TextMapCarrier.Get which returns a single value.
4040
type MultiGetter interface {
41-
// GetAll returns all values associated with the passed key.
42-
GetAll(key string) []string
41+
// Values returns all values associated with the passed key.
42+
Values(key string) []string
4343
// DO NOT CHANGE: any modification will not be backwards compatible and
4444
// must never be done outside of a new major release.
4545
}
@@ -78,8 +78,8 @@ func (hc HeaderCarrier) Get(key string) string {
7878
return http.Header(hc).Get(key)
7979
}
8080

81-
// GetAll returns all values associated with the passed key.
82-
func (hc HeaderCarrier) GetAll(key string) []string {
81+
// Values returns all values associated with the passed key.
82+
func (hc HeaderCarrier) Values(key string) []string {
8383
return http.Header(hc).Values(key)
8484
}
8585

0 commit comments

Comments
 (0)