Fixed PR lint failure

This commit is contained in:
Austin Browder 2023-11-07 12:25:02 -07:00
parent 746ab856e0
commit 8974cce072
1 changed files with 7 additions and 5 deletions

View File

@ -109,17 +109,19 @@ func (u *promUnifi) exportUSG(r report, d *unifi.USG) {
// Gateway Stats.
func (u *promUnifi) exportUSGstats(r report, labels []string, gw *unifi.Gw, st unifi.SpeedtestStatus, ul unifi.Uplink) {
if gw == nil {
return
}
labelLan := []string{"lan", labels[1], labels[2], labels[3]}
var sourceInterface string
if st.SourceInterface != "" {
sourceInterface = st.SourceInterface
} else {
sourceInterface = "all"
}
if gw == nil {
return
}
labelLan := []string{"lan", labels[1], labels[2], labels[3]}
labelWan := []string{sourceInterface, labels[1], labels[2], labels[3]}
r.send([]*metric{