diff --git a/net/netmon/interfaces_test.go b/net/netmon/interfaces_test.go index edd4f6d6e..5fec274ca 100644 --- a/net/netmon/interfaces_test.go +++ b/net/netmon/interfaces_test.go @@ -13,7 +13,7 @@ import ( ) func TestGetState(t *testing.T) { - st, err := GetState() + st, err := getState() if err != nil { t.Fatal(err) } diff --git a/net/netmon/netmon.go b/net/netmon/netmon.go index 47b540d6a..b58356d33 100644 --- a/net/netmon/netmon.go +++ b/net/netmon/netmon.go @@ -161,7 +161,7 @@ func (m *Monitor) InterfaceState() *State { } func (m *Monitor) interfaceStateUncached() (*State, error) { - return GetState() + return getState() } // SetTailscaleInterfaceName sets the name of the Tailscale interface. For diff --git a/net/netmon/state.go b/net/netmon/state.go index a612dd06d..b6a6b2ab8 100644 --- a/net/netmon/state.go +++ b/net/netmon/state.go @@ -466,7 +466,7 @@ var getPAC func() string // It does not set the returned State.IsExpensive. The caller can populate that. // // Deprecated: use netmon.Monitor.InterfaceState instead. -func GetState() (*State, error) { +func getState() (*State, error) { s := &State{ InterfaceIPs: make(map[string][]netip.Prefix), Interface: make(map[string]Interface),