bleve: Index | Files

package zap

import ""


Package Files

dict.go docvalue.go explore.go fields.go footer.go root.go stored.go


var RootCmd = &cobra.Command{
    Use:   "zap",
    Short: "command-line tool to interact with a zap file",
    Long:  `Zap is a command-line tool to interact with a zap file.`,
    PersistentPreRunE: func(cmd *cobra.Command, args []string) error {

        if len(args) < 1 {
            return fmt.Errorf("must specify path to zap file")

        segInf, err := zap.Open(args[0])
        if err != nil {
            return fmt.Errorf("error opening zap file: %v", err)
        segment = segInf.(*zap.Segment)

        return nil
    PersistentPostRunE: func(cmd *cobra.Command, args []string) error {
        return nil

RootCmd represents the base command when called without any subcommands

func Execute Uses

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.

Package zap imports 13 packages (graph) and is imported by 1 packages. Updated 2019-01-15. Refresh now. Tools for package owners.