From de11f90d9d740fb3efd36deae7898ac491f4c19e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 22 Jul 2020 10:31:28 -0700 Subject: [PATCH] ipn: remove unused parameter to func LoadPrefs, fix godoc subject --- ipn/local.go | 2 +- ipn/prefs.go | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ipn/local.go b/ipn/local.go index 3b9bef3d1..c9759cb65 100644 --- a/ipn/local.go +++ b/ipn/local.go @@ -580,7 +580,7 @@ func (b *LocalBackend) loadStateLocked(key StateKey, prefs *Prefs, legacyPath st if err != nil { if errors.Is(err, ErrStateNotExist) { if legacyPath != "" { - b.prefs, err = LoadPrefs(legacyPath, true) + b.prefs, err = LoadPrefs(legacyPath) if err != nil { b.logf("Failed to load legacy prefs: %v", err) b.prefs = NewPrefs() diff --git a/ipn/prefs.go b/ipn/prefs.go index 7de645c50..c10ffbdba 100644 --- a/ipn/prefs.go +++ b/ipn/prefs.go @@ -217,10 +217,9 @@ func (p *Prefs) Clone() *Prefs { return p2 } -// LoadLegacyPrefs loads a legacy relaynode config file into Prefs -// with sensible migration defaults set. If enforceDefaults is true, -// Prefs.RouteAll and Prefs.AllowSingleHosts are forced on. -func LoadPrefs(filename string, enforceDefaults bool) (*Prefs, error) { +// LoadPrefs loads a legacy relaynode config file into Prefs +// with sensible migration defaults set. +func LoadPrefs(filename string) (*Prefs, error) { data, err := ioutil.ReadFile(filename) if err != nil { return nil, fmt.Errorf("loading prefs from %q: %v", filename, err)