design: add back labels method to *ProfileLabels
Labels will panic if called on a *ProfileLabels returned by the
runtime, or one extended from a *ProfileLabels returned by the runtime.
Change-Id: Ie1e18719eb4955405d213d0ad211e9330cbdb5e1
Reviewed-on: https://go-review.googlesource.com/31356
Reviewed-by: Alan Donovan <adonovan@google.com>
diff --git a/design/17280-profile-labels.md b/design/17280-profile-labels.md
index f98e5c8..2b82512 100644
--- a/design/17280-profile-labels.md
+++ b/design/17280-profile-labels.md
@@ -2,7 +2,7 @@
Author: Michael Matloob
-Last updated: 11 October 2016
+Last updated: 18 October 2016
Discussion at https://golang.org/issue/17280.
@@ -97,6 +97,11 @@
// A label overwrites a prior label with the same key.
func (l *ProfileLabels) WithLabels(labels ...[2]string) *ProfileLabels
+ // Labels returns a new slice containing the labels in the ProfileLabels.
+ // Labels panics if called on a ProfileLabels returned by SetProfileLabels
+ // or derived from one by WithLabels.
+ func (l *ProfileLabels) Labels() [][2]string
+
### `Context` changes
Each `Context` has a set of profiler labels associated with it.