config default path / writing / onboarding occurs
This commit is contained in:
parent
8d5da14c4b
commit
7151f4270f
6
ooni.go
6
ooni.go
|
@ -26,6 +26,7 @@ func Onboarding(c *Config) error {
|
||||||
c.Unlock()
|
c.Unlock()
|
||||||
|
|
||||||
if err := c.Write(); err != nil {
|
if err := c.Write(); err != nil {
|
||||||
|
log.Warnf("Failed to save informed consent: %v", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -113,6 +114,11 @@ func (c *Config) Unlock() {
|
||||||
|
|
||||||
// Default config settings
|
// Default config settings
|
||||||
func (c *Config) Default() error {
|
func (c *Config) Default() error {
|
||||||
|
home, err := GetOONIHome()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
c.path = filepath.Join(home, "config.json")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user