command

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: BSD-3-Clause Imports: 6 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.

README

Command utils

This module is for adding functionality to commands

Say you want a function to take a name, you define the command

command := &cli.Command{
    Name: "some-command"
}

Now before returning if you want to attach an ability to this command

command.Name(command)

This empty wrapping will attribute args[0] to name, and return an error if the name is not found

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name(c *cli.Command)

func NameWithDefault

func NameWithDefault(c *cli.Command, def string)

func Names

func Names(c *cli.Command)

func Universe

func Universe(c *cli.Command)

func Universe0

func Universe0(c *cli.Command)

Types

This section is empty.

Jump to

Keyboard shortcuts

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