SetLabel sets the specified key to the specified value for all samples in the profile.
(key string, value []string)
| 716 | // SetLabel sets the specified key to the specified value for all samples in the |
| 717 | // profile. |
| 718 | func (p *Profile) SetLabel(key string, value []string) { |
| 719 | for _, sample := range p.Sample { |
| 720 | if sample.Label == nil { |
| 721 | sample.Label = map[string][]string{key: value} |
| 722 | } else { |
| 723 | sample.Label[key] = value |
| 724 | } |
| 725 | } |
| 726 | } |
| 727 | |
| 728 | // RemoveLabel removes all labels associated with the specified key for all |
| 729 | // samples in the profile. |
no outgoing calls