discovery/targetgroup/targetgroup.go
func (tg Group) MarshalYAML() (interface{}, error) {
	g := &struct {
		Targets []string       `yaml:"targets"`
		Labels  model.LabelSet `yaml:"labels,omitempty"`
	}{
		Targets: make([]string, 0, len(tg.Targets)),
		Labels:  tg.Labels,
	}
	for _, t := range tg.Targets {
		g.Targets = append(g.Targets, string(t[model.AddressLabel]))
	}
	return g, nil
}
func (tg Group) MarshalYAML() (interface{}, error) {
	g := &struct {
		Targets []string       `yaml:"targets"`
		Labels  model.LabelSet `yaml:"labels,omitempty"`
	}{
		Targets: make([]string, 0, len(tg.Targets)),
		Labels:  tg.Labels,
	}
	for _, t := range tg.Targets {
		g.Targets = append(g.Targets, string(t[model.AddressLabel]))
	}
	return g, nil
}
func ( tg Group ) MarshalYAML ( ) ( interface { } , error ) { g := & struct { Targets [ ] string `yaml:"targets"` Labels model . LabelSet `yaml:"labels,omitempty"` } { Targets : make ( [ ] string , 0 , len ( tg . Targets ) ) , Labels : tg . Labels , } for _ , t := range tg . Targets { g . Targets = append ( g . Targets , string ( t [ model . AddressLabel ] ) ) } return g , nil }
// MarshalYAML implements the yaml.Marshaler interface.
MarshalYAML implements the yaml . Marshaler interface .