Remove ToString0[T] usage to fix golangci-lint
This commit is contained in:
@@ -36,6 +36,7 @@ func (m *monitor) Start() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
go m.loopUpdate()
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -72,9 +73,16 @@ func (m *monitor) checkUpdate() error {
|
||||
continue
|
||||
}
|
||||
|
||||
oldInterface := m.defaultInterfaceName
|
||||
oldIndex := m.defaultInterfaceIndex
|
||||
|
||||
m.defaultInterfaceName = link.Attrs().Name
|
||||
m.defaultInterfaceIndex = link.Attrs().Index
|
||||
|
||||
if oldInterface == m.defaultInterfaceName && oldIndex == m.defaultInterfaceIndex {
|
||||
return nil
|
||||
}
|
||||
|
||||
m.logger.Info("updated default interface ", m.defaultInterfaceName, ", index ", m.defaultInterfaceIndex)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user