// RemoveLabel removes a label from issue by given ID.
513012
func (issue *Issue) RemoveLabel(doer *User, label *Label) error {
	if err := DeleteIssueLabel(issue, label); err != nil {
		return err
	}

	issue.sendLabelUpdatedWebhook(doer)
	return nil
}
1341204
func AddLabel(labels map[string]string, labelKey, labelValue string) map[string]string {
	if labelKey == "" {
		// Don't need to add a label.
		return labels
	}
	if labels == nil {
		labels = make(map[string]string)
	}
	labels[labelKey] = labelValue
	return labels
}
342345
func (id *Identity) Sanitize() {
	if id.Labels != nil {
		id.LabelArray = id.Labels.LabelArray()
	}
}
1355201
func (s *CaptionSource) SetLabel(v string) *CaptionSource {
	s.Label = &v
	return s
}
495797
func (l *LabelsService) Delete(uri *Hyperlink, uriParams M) (success bool, result *Result) {
	url, err := ExpandWithDefault(uri, &RepoLabelsURL, uriParams)
	if err != nil {
		return false, &Result{Err: err}
	}

	result = l.client.delete(url, nil, nil)

	success = (result.Response.StatusCode == 204)
	return
}
932868
func (issue *Issue) HasLabel(labelID int64) bool {
	return issue.hasLabel(x, labelID)
}
1242872
func (s *DescribeLunaClientOutput) SetLabel(v string) *DescribeLunaClientOutput {
	s.Label = &v
	return s
}
1313374
func (issue *Issue) AddLabel(doer *User, label *Label) error {
	if err := NewIssueLabel(issue, label); err != nil {
		return err
	}

	issue.sendLabelUpdatedWebhook(doer)
	return nil
}
77918
func (p *Loader) RemoveListener(id string) {
	p.Lock()
	delete(p.listeners, id)
	p.Unlock()
}
890030
func (b *Button) SetLabel(label string) *Button {
	b.label = label
	return b
}
1288167
func newDeleteLabelHandler(s plat.LabelService) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()

		req, err := decodeDeleteLabelRequest(ctx, r)
		if err != nil {
			EncodeError(ctx, err, w)
			return
		}

		label := plat.Label{
			ResourceID: req.ResourceID,
			Name:       req.Name,
		}

		if err := s.DeleteLabel(ctx, label); err != nil {
			EncodeError(ctx, err, w)
			return
		}

		w.WriteHeader(http.StatusNoContent)
	}
}
1207901
func (i *InputField) SetLabel(label string) *InputField {
	i.label = label
	return i
}
657048
func (s *DeleteApplicationVersionInput) SetVersionLabel(v string) *DeleteApplicationVersionInput {
	s.VersionLabel = &v
	return s
}
562669
func makeLabel(labelName string, labelVal string) map[string]string {
	return map[string]string{labelName: labelVal}
}
205335
func (k *Apk) Label(resConfig *androidbinary.ResTableConfig) (s string, err error) {
	s = k.getResource(k.manifest.App.Label, resConfig)
	if androidbinary.IsResID(s) {
		err = errors.New("unable to convert label-id to string")
	}
	return
}
1248377
func (s *MetricDataResult) SetLabel(v string) *MetricDataResult {
	s.Label = &v
	return s
}
1193744
func (l *IssueLabelsService) Remove(uri *Hyperlink, uriParams M) (success bool, result *Result) {
	url, err := ExpandWithDefault(uri, &IssueLabelsURL, uriParams)
	if err != nil {
		return false, &Result{Err: err}
	}

	result = l.client.delete(url, nil, nil)

	success = (result.Response.StatusCode == 204)
	return
}