mirror of
https://github.com/unpoller/unpoller.git
synced 2026-03-31 06:24:19 -04:00
fix: rename unused exportWithTags param to _ to satisfy revive
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -82,6 +82,7 @@ func (u *promUnifi) exportUDM(r report, d *unifi.UDM) {
|
||||
u.exportWithTags(r, d.Tags, func(tagLabels []string) {
|
||||
tag := tagLabels[0]
|
||||
labels := baseLabels
|
||||
|
||||
infoLabels := append(baseInfoLabels, tag)
|
||||
|
||||
// Shared data (all devices do this).
|
||||
@@ -129,10 +130,11 @@ func (u *promUnifi) exportUDM(r report, d *unifi.UDM) {
|
||||
|
||||
// exportWithTags exports metrics with tag support. If device has multiple tags,
|
||||
// each tag creates a separate metric series. If no tags, exports with tag="".
|
||||
func (u *promUnifi) exportWithTags(r report, tags []string, fn func([]string)) {
|
||||
func (u *promUnifi) exportWithTags(_ report, tags []string, fn func([]string)) {
|
||||
if len(tags) == 0 {
|
||||
// No tags - export once with empty tag
|
||||
fn([]string{""})
|
||||
|
||||
return
|
||||
}
|
||||
// Multiple tags - export once per tag
|
||||
|
||||
Reference in New Issue
Block a user