in pkg/kepctl/commands/query.go [115:132]
func runQuery(opts *repo.QueryOpts) error {
rc, err := repo.New(rootOpts.RepoPath)
if err != nil {
return errors.Wrap(err, "creating repo client")
}
rc.TokenPath = rootOpts.TokenPath
results, err := rc.Query(opts)
if err != nil {
return err
}
o, err := output.NewOutput(opts.Output, os.Stdout, os.Stderr)
if err != nil {
return err
}
o.PrintProposals(results)
return nil
}