Fixed PR lint failure
This commit is contained in:
parent
746ab856e0
commit
8974cce072
|
|
@ -109,17 +109,19 @@ func (u *promUnifi) exportUSG(r report, d *unifi.USG) {
|
||||||
|
|
||||||
// Gateway Stats.
|
// Gateway Stats.
|
||||||
func (u *promUnifi) exportUSGstats(r report, labels []string, gw *unifi.Gw, st unifi.SpeedtestStatus, ul unifi.Uplink) {
|
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
|
var sourceInterface string
|
||||||
|
|
||||||
if st.SourceInterface != "" {
|
if st.SourceInterface != "" {
|
||||||
sourceInterface = st.SourceInterface
|
sourceInterface = st.SourceInterface
|
||||||
} else {
|
} else {
|
||||||
sourceInterface = "all"
|
sourceInterface = "all"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if gw == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
labelLan := []string{"lan", labels[1], labels[2], labels[3]}
|
||||||
labelWan := []string{sourceInterface, labels[1], labels[2], labels[3]}
|
labelWan := []string{sourceInterface, labels[1], labels[2], labels[3]}
|
||||||
|
|
||||||
r.send([]*metric{
|
r.send([]*metric{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue