command

package
v0.0.0-...-7bd301e Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: LGPL-3.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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