command

package
v0.0.0-...-8f649d9 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Run = rootCmd.Execute // TODO: Don't know if it's a good idea

Run runs the root command which initialises the program.

Functions

func RegisterCmd

func RegisterCmd(cmd *cobra.Command)

RegisterCmd adds the parsed cmd as a sub-command of the root cmd.

func RunCmd

func RunCmd(cmd *cobra.Command, args []string, fn CobraFunc)

RunCmd is a helper to run a generic command

It's intended to be used by the sub-commands

Types

type CobraFunc

type CobraFunc func(cmd *cobra.Command, args []string) error

CobraFunc is the generic cobra function to execute in a cli

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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