Make ipn.Options.Prefs a pointer.
This is a prelude to making it truly optional, once state management has moved into the backend. For now though, it's still required. This change is just isolating the bubbling-up of the pointerification into other layers. Signed-Off-By: David Anderson <dave@natulte.net>
This commit is contained in:
committed by
Dave Anderson
parent
f6f154193f
commit
21280ca2d1
+2
-2
@@ -103,7 +103,7 @@ func (uc *Prefs) Copy() *Prefs {
|
||||
return &uc2
|
||||
}
|
||||
|
||||
func LoadPrefs(filename string, enforceDefaults bool) Prefs {
|
||||
func LoadPrefs(filename string, enforceDefaults bool) *Prefs {
|
||||
log.Printf("Loading prefs %v\n", filename)
|
||||
data, err := ioutil.ReadFile(filename)
|
||||
uc := NewPrefs()
|
||||
@@ -136,7 +136,7 @@ post:
|
||||
uc.WantRunning = true
|
||||
}
|
||||
log.Printf("Loaded prefs %v %v\n", filename, uc.Pretty())
|
||||
return uc
|
||||
return &uc
|
||||
}
|
||||
|
||||
func SavePrefs(filename string, uc *Prefs) {
|
||||
|
||||
Reference in New Issue
Block a user