Remove ToString0[T] usage to fix golangci-lint

This commit is contained in:
世界
2022-07-10 22:00:28 +08:00
parent 0ef2e330e3
commit 6048b1e270
24 changed files with 59 additions and 99 deletions

View File

@@ -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
}