Replace manual array indexing (labels[1], labels[2], labels[3]) with
cleaner append syntax using slice notation (labels[1:]...).
This makes the code more maintainable and idiomatic Go.
Before: labelTotal := []string{"total", labels[1], labels[2], labels[3]}
After: labelTotal := append([]string{"total"}, labels[1:]...)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| LICENSE | ||
| README.md | ||
| clients.go | ||
| collector.go | ||
| logger.go | ||
| pdu.go | ||
| report.go | ||
| site.go | ||
| uap.go | ||
| ubb.go | ||
| uci.go | ||
| udm.go | ||
| usg.go | ||
| usw.go | ||
| uxg.go | ||
README.md
prometheus
This package provides the interface to turn UniFi measurements into prometheus exported metrics. Requires the poller package for actual UniFi data collection.