show

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cli.Command{
	Name:  "show",
	Usage: "Show state of the bulk",

	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:        "output",
			Aliases:     []string{"o"},
			Usage:       "output format: text/json. Default is text",
			DefaultText: "text",
		},
	},

	Action: func(ctx *cli.Context) error {
		cfg, err := excav.LoadConfiguration()
		if err != nil {
			return termui.CliError(ctx, errors.New("Cannot load configuration. Check the ~/.config/excav/config.yaml"))
		}

		blk, err := excav.OpenBulk(cfg)
		if err != nil {
			return cli.Exit("Cannot open current bulk", 1)
		}

		if ctx.String("output") == "json" {
			describeAsJson(blk)
		} else {
			describeAsText(blk)
		}

		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL