net/dns: change windows DNS manager to use pointer receiver

This is safer given that we need to close the NRPT database.

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
This commit is contained in:
Aaron Klotz
2022-08-03 16:18:19 -06:00
parent bdd8ce6692
commit 41e1d336cc
2 changed files with 16 additions and 15 deletions

View File

@@ -89,7 +89,7 @@ func TestManagerWindowsGPMove(t *testing.T) {
if err != nil {
t.Fatalf("NewOSConfigurator: %v\n", err)
}
mgr := cfg.(windowsManager)
mgr := cfg.(*windowsManager)
defer mgr.Close()
usingGP := mgr.nrptDB.writeAsGP
@@ -218,7 +218,7 @@ func runTest(t *testing.T, isLocal bool) {
if err != nil {
t.Fatalf("NewOSConfigurator: %v\n", err)
}
mgr := cfg.(windowsManager)
mgr := cfg.(*windowsManager)
defer mgr.Close()
usingGP := mgr.nrptDB.writeAsGP