2018-06-25 16:31:44 +02:00
|
|
|
package onboard
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/alecthomas/kingpin"
|
|
|
|
"github.com/ooni/probe-cli/internal/cli/root"
|
2018-06-25 17:14:29 +02:00
|
|
|
"github.com/ooni/probe-cli/internal/onboard"
|
2018-06-25 16:31:44 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
cmd := root.Command("onboard", "Starts the onboarding process")
|
|
|
|
|
|
|
|
cmd.Action(func(_ *kingpin.ParseContext) error {
|
2018-06-25 17:09:10 +02:00
|
|
|
ctx, err := root.Init()
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2018-06-25 17:14:29 +02:00
|
|
|
return onboard.Onboarding(ctx.Config)
|
2018-06-25 16:31:44 +02:00
|
|
|
})
|
|
|
|
}
|