//Label permits to create a label inside a Form
507542
func (f Form) Label(value string, opts tags.Options) *tags.Tag {
	opts["body"] = value
	return tags.New("label", opts)
}
1313374
func (issue *Issue) AddLabel(doer *User, label *Label) error {
	if err := NewIssueLabel(issue, label); err != nil {
		return err
	}

	issue.sendLabelUpdatedWebhook(doer)
	return nil
}
715050
func labels(key string) func(*Status) []string {
	return func(s *Status) []string {
		vs := make([]string, 0, len(s.Labels))
		for _, l := range s.Labels {
			if l.Key == key {
				vs = append(vs, l.Value)
			}
		}
		return vs
	}
}
796256
func (f *Family) AddLabel(key, val string) {
	for i, item := range f.Metrics {
		switch item.(type) {
		case Metric:
			m := item.(Metric)
			m.Labels[key] = val
			f.Metrics[i] = m
		}
	}
}
534722
func (p *Path) LabelContext(via ...interface{}) *Path {
	np := p.clone()
	np.stack = append(np.stack, labelContextMorphism(nil, via...))
	return np
}
15544
func (t *partitionTracker) Labels() prometheus.Labels {
	l := make(map[string]string, len(t.labels))
	for k, v := range t.labels {
		l[k] = v
	}
	return l
}
1360455
func (i *IPAddressPerTask) AddLabel(name, value string) *IPAddressPerTask {
	if i.Labels == nil {
		i.EmptyLabels()
	}
	(*i.Labels)[name] = value
	return i
}
833252
func (p *PodContainer) AddLabel(key, value string) *PodContainer {
	p.Labels[key] = value
	return p
}
1341602
func (r *Application) AddLabel(name, value string) *Application {
	if r.Labels == nil {
		r.EmptyLabels()
	}
	(*r.Labels)[name] = value

	return r
}
257202
func (f *Field) SetLabel(label string) FieldInterface {
	f.label = label
	return f
}
547990
func (m *retentionMetrics) Labels() prometheus.Labels {
	l := make(map[string]string, len(m.labels))
	for k, v := range m.labels {
		l[k] = v
	}
	return l
}
1084376
func (s *LabelService) CreateLabel(ctx context.Context, l *influxdb.Label) error {
	if err := authorizeReadOrg(ctx, l.OrgID); err != nil {
		return err
	}

	return s.s.CreateLabel(ctx, l)
}
742811
func (c *configuration) label(i head) lingo.DependencyType {
	if i < 0 {
		return lingo.NoDepType
	}

	if i == 0 {
		return lingo.NoDepType
	}

	return c.Label(int(i))
	// i--

	// labels := c.Labels()
	// return labels[i]
}
97007
func (c *Checkbox) SetLabel(label string) *Checkbox {
	c.label = label
	return c
}
966939
func (m *GormLabelRepository) Create(ctx context.Context, u *Label) error {
	defer goa.MeasureSince([]string{"goa", "db", "label", "create"}, time.Now())
	u.ID = uuid.NewV4()
	if strings.TrimSpace(u.Name) == "" {
		return errors.NewBadParameterError("label name cannot be empty string", u.Name).Expected("non empty string")
	}
	err := m.db.Create(u).Error
	if err != nil {
		// combination of name and space ID should be unique
		if gormsupport.IsUniqueViolation(err, "labels_name_space_id_unique_idx") {
			log.Error(ctx, map[string]interface{}{
				"err":      err,
				"name":     u.Name,
				"space_id": u.SpaceID,
			}, "unable to create label because a label with same already exists in the space")
			return errors.NewDataConflictError(fmt.Sprintf("label already exists with name = %s , space_id = %s", u.Name, u.SpaceID.String()))
		}
		log.Error(ctx, map[string]interface{}{}, "error adding Label: %s", err.Error())
		return err
	}
	return nil
}
1151204
func labeled(issue *github.Issue, label string) bool {
	for _, l := range issue.Labels {
		if *l.Name == label {
			return true
		}
	}
	return false
}
1242872
func (s *DescribeLunaClientOutput) SetLabel(v string) *DescribeLunaClientOutput {
	s.Label = &v
	return s
}