mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 21:24:05 -08:00
format comment
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
This commit is contained in:
parent
9e6dc6f96c
commit
f60620ec0b
|
@ -200,7 +200,7 @@ func (d *discovery) Run(ctx context.Context, ch chan<- []*targetgroup.Group) {
|
|||
tgs = append(tgs, tg)
|
||||
newSourceList[tg.Source] = true
|
||||
}
|
||||
// when targetGroup disappear, send an update with empty targetList
|
||||
// When targetGroup disappear, send an update with empty targetList.
|
||||
for key := range d.oldSourceList {
|
||||
if !newSourceList[key] {
|
||||
tgs = append(tgs, &targetgroup.Group{
|
||||
|
|
|
@ -59,7 +59,7 @@ func generateTargetGroups(allTargetGroups map[string][]*targetgroup.Group) map[s
|
|||
for k, sdTargetGroups := range allTargetGroups {
|
||||
for i, group := range sdTargetGroups {
|
||||
|
||||
// There is no target, so no need to keep it
|
||||
// There is no target, so no need to keep it.
|
||||
if len(group.Targets) <= 0 {
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
)
|
||||
|
||||
// TestGenerateTargetGroups checks that the target is correctly generated.
|
||||
// It covers the case when the target is empty
|
||||
// It covers the case when the target is empty.
|
||||
func TestGenerateTargetGroups(t *testing.T) {
|
||||
testCases := []struct {
|
||||
title string
|
||||
|
|
Loading…
Reference in a new issue