feat(geoip, info): write comprehensive unit tests
This commit is contained in:
parent
fa803300bb
commit
7eedf4d947
6 changed files with 415 additions and 41 deletions
|
|
@ -19,6 +19,15 @@ var Command = Cmd.Command
|
|||
// Init should be called by all subcommand that care to have a ooni.Context instance
|
||||
var Init func() (*ooni.Probe, error)
|
||||
|
||||
// NewProbeCLI is like Init but returns a ooni.ProbeCLI instead.
|
||||
func NewProbeCLI() (ooni.ProbeCLI, error) {
|
||||
probeCLI, err := Init()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return probeCLI, nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
configPath := Cmd.Flag("config", "Set a custom config file path").Short('c').String()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue