command

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SetupFolder string

	SetupCmd = &cli.Command{
		Name:  "setup",
		Usage: "Setup configuration for folder",
		Flags: []cli.Flag{
			&cli.StringFlag{
				Name:        folderArg,
				Aliases:     []string{"f"},
				Value:       ".",
				Usage:       "Folder",
				Destination: &SetupFolder,
			},
			&cli.BoolFlag{
				Name:        enableArg,
				Destination: &setupEnable,
				Usage:       "Enable folder",
			},
			&cli.BoolFlag{
				Name:        disableArg,
				Destination: &setupDisable,
				Usage:       "Disable folder",
			},
			&cli.BoolFlag{
				Name:        disableSubFolders,
				Destination: &setupDisableSubs,
				Usage:       "Disable all sub folders",
			},
		},
		Action: SetupAction,
		Before: BeforeAction,
	}
)
View Source
var (
	GoCmd = &cli.Command{
		Name:      "go",
		Usage:     "Go to folder",
		ArgsUsage: "[words for locate the folders]",
		Action:    GoAction,
		Before:    BeforeGoAction,
		Flags: []cli.Flag{
			&cli.BoolFlag{
				Name:        "just-cd",
				Destination: &justCD,
				Usage:       "Just go to folder, skip custom command",
			},
			&cli.BoolFlag{
				Name:        "open",
				Destination: &openFolder,
				Usage:       "Opens folder into file browser",
			},
		},
	}
)
View Source
var (
	InstallCmd = &cli.Command{
		Name:  "install",
		Usage: "Install go-dev",
		Flags: []cli.Flag{
			&cli.BoolFlag{
				Name:        "uninstall",
				Usage:       "Remove installation",
				Destination: &installRemove,
			},
			&cli.PathFlag{
				Name:        "basefolder",
				Usage:       "Development base folder",
				Value:       configuration.DefaultDevFolder(),
				Destination: &devBaseFolder,
			},
			&cli.IntFlag{
				Name:        "max-path-level",
				Usage:       "Maximum level of paths",
				Value:       configuration.MaximumSubLevel,
				Destination: &maximumSubLevel,
			},
		},
		Action: InstallAction,
		Before: BeforeInstallAction,
	}
)
View Source
var (
	ListCmd = &cli.Command{
		Name:   "list",
		Usage:  "List folders",
		Action: ListAction,
		Before: BeforeListAction,
	}
)
View Source
var (
	UpdateCmd = &cli.Command{
		Name:   "update",
		Usage:  "Update folders",
		Action: UpdateAction,
		Before: BeforeUpdateAction,
	}
)

Functions

func BeforeAction

func BeforeAction(context *cli.Context) error

func BeforeGoAction

func BeforeGoAction(context *cli.Context) error

func BeforeInstallAction

func BeforeInstallAction(context *cli.Context) error

func BeforeListAction

func BeforeListAction(context *cli.Context) error

func BeforeUpdateAction

func BeforeUpdateAction(context *cli.Context) error

func GoAction

func GoAction(context *cli.Context) error

func InstallAction

func InstallAction(context *cli.Context) error

func ListAction

func ListAction(context *cli.Context) error

func SetupAction

func SetupAction(context *cli.Context) error

func UpdateAction

func UpdateAction(context *cli.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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