subcmd

package
v0.5.63 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   filepath.Base(os.Args[0]),
	Short: "The Fabulous Laboratory",
	PersistentPreRun: func(_ *cobra.Command, _ []string) {
		if verbose {
			logrus.SetLevel(logrus.DebugLevel)
		}

		switch logFormatter {
		case "pfxlog":
			options := pfxlog.DefaultOptions().StartingToday()
			logrus.SetFormatter(pfxlog.NewFormatter(options))
		case "json":
			logrus.SetFormatter(&logrus.JSONFormatter{})
		case "text":
			logrus.SetFormatter(&logrus.TextFormatter{})
		default:

		}
	},
}

Functions

func Execute

func Execute() error

func NewCreateCommand added in v0.4.0

func NewCreateCommand() *cobra.Command

Types

type CreateCommand added in v0.4.0

type CreateCommand struct {
	Name       string
	WorkingDir string
	Bindings   map[string]string
	Executable string
}

type ImportCommand added in v0.5.1

type ImportCommand struct {
	*cobra.Command
}

func NewImportCommand added in v0.5.1

func NewImportCommand() *ImportCommand

Jump to

Keyboard shortcuts

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