Skip to content

Commit

Permalink
Fixed PR lint failure
Browse files Browse the repository at this point in the history
  • Loading branch information
austinbrowder committed Nov 7, 2023
1 parent 746ab85 commit 8974cce
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/promunifi/usg.go
Expand Up @@ -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{
Expand Down

0 comments on commit 8974cce

Please sign in to comment.