mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08:00
Fix nil context staticcheck error.
This commit is contained in:
parent
0f37c02343
commit
0d9fe18f5e
|
@ -206,7 +206,7 @@ func (d *Discovery) refresh() (tg *targetgroup.Group, err error) {
|
||||||
if len(d.filter) > 0 {
|
if len(d.filter) > 0 {
|
||||||
ilc = ilc.Filter(d.filter)
|
ilc = ilc.Filter(d.filter)
|
||||||
}
|
}
|
||||||
err = ilc.Pages(nil, func(l *compute.InstanceList) error {
|
err = ilc.Pages(context.TODO(), func(l *compute.InstanceList) error {
|
||||||
for _, inst := range l.Items {
|
for _, inst := range l.Items {
|
||||||
if len(inst.NetworkInterfaces) == 0 {
|
if len(inst.NetworkInterfaces) == 0 {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue