Refactoring to reduce package count
* Consolidate util and utils into the same package * Move internal/onboard into internal/cli/onboard * Move maybeOnboard into the onboard package
This commit is contained in:
parent
430a53e7d6
commit
58199a020e
12 changed files with 189 additions and 194 deletions
15
ooni.go
15
ooni.go
|
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/ooni/probe-cli/internal/database"
|
||||
"github.com/ooni/probe-cli/internal/enginex"
|
||||
"github.com/ooni/probe-cli/internal/legacy"
|
||||
"github.com/ooni/probe-cli/internal/onboard"
|
||||
"github.com/ooni/probe-cli/utils"
|
||||
"github.com/ooni/probe-cli/version"
|
||||
engine "github.com/ooni/probe-engine"
|
||||
|
|
@ -37,20 +36,6 @@ func (c *Context) MaybeLocationLookup() error {
|
|||
return c.Session.MaybeLookupLocation()
|
||||
}
|
||||
|
||||
// MaybeOnboarding will run the onboarding process only if the informed consent
|
||||
// config option is set to false
|
||||
func (c *Context) MaybeOnboarding() error {
|
||||
if c.Config.InformedConsent == false {
|
||||
if c.IsBatch == true {
|
||||
return errors.New("cannot run onboarding in batch mode")
|
||||
}
|
||||
if err := onboard.Onboarding(c.Config); err != nil {
|
||||
return errors.Wrap(err, "onboarding")
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Init the OONI manager
|
||||
func (c *Context) Init() error {
|
||||
var err error
|
||||
|
|
|
|||
Loading…
Reference in a new issue