Version: v0.7.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2018 License: Apache-2.0 Imports: 19 Imported by: 0




This section is empty.


View Source
var RootCmd = &cobra.Command{
	Use:   "bleve",
	Short: "command-line tool to interact with a bleve index",
	Long:  `Bleve is a command-line tool to interact with a bleve index.`,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		if len(args) < 1 {
			return fmt.Errorf("must specify path to index")
		var err error
		idx, err = bleve.Open(args[0])
		if err != nil {
			return fmt.Errorf("error opening bleve index: %v", err)
		return nil
	PersistentPostRunE: func(cmd *cobra.Command, args []string) error {
		err := idx.Close()
		if err != nil {
			return fmt.Errorf("error closing bleve index: %v", err)
		return nil

RootCmd represents the base command when called without any subcommands


func CanMutateBleveIndex added in v0.6.0

func CanMutateBleveIndex(c *cobra.Command) bool

CanMutateBleveIndex returns true if the command is capable of mutating the bleve index, or false if its operation is read-only

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.


This section is empty.


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL