Skip to content

Commit 2f60ea6

Browse files
committed
design: rename context.DoWithLabels to context.DoWithProfileLabels
also add context.ProfileLabels(Context) to get the profile labels set on the context. There now is a way to access labels, so the previous comment saying there wasn't is out of date. Change-Id: I65d6bf18c0cba3b1d7c017887393008f2afc4b69 Reviewed-on: https://go-review.googlesource.com/31669 Reviewed-by: Quentin Smith <[email protected]>
1 parent 0bdeab7 commit 2f60ea6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

design/17280-profile-labels.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,18 @@ In this proposal, the following function will be added to the
6363

6464
package context
6565

66-
// DoWithLabels calls f with a copy of the parent context with the
66+
// DoWithProfileLabels calls f with a copy of the parent context with the
6767
// given labels added to the parent's label map.
6868
// Labels should be a slice of key-value pairs.
6969
// Labels are added to the label map in the order provided and override
7070
// any previous label with the same key.
7171
// The combined label map will be set for the duration of the call to f
7272
// and restored once f returns.
73-
func DoWithLabels(parent Context, labels [][2]string, f func(ctx Context))
73+
func DoWithProfileLabels(parent Context, labels [][2]string, f func(ctx Context))
74+
75+
// ProfileLabels returns a new slice containing the profile labels
76+
// on the context.
77+
func ProfileLabels(ctx Context) [][2]string
7478

7579
The following types and functions will be added to the
7680
[runtime](golang.org/pkg/runtime) package.

0 commit comments

Comments
 (0)