common

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsShorthandOnly

func IsShorthandOnly(flag *pflag.Flag) bool

uses reflection to check for pflag.Flag.Shorthandonly to support both spf13/pflag and cornfeedhobos shorthand change (needed for carapace-bin) won't be necessary if https://github.com/spf13/pflag/pull/256 should ever be merged

func TraverseLenient added in v0.3.10

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

Types

type ByValue added in v0.3.0

type ByValue []RawValue

func (ByValue) Len added in v0.3.0

func (a ByValue) Len() int

func (ByValue) Less added in v0.3.0

func (a ByValue) Less(i, j int) bool

func (ByValue) Swap added in v0.3.0

func (a ByValue) Swap(i, j int)

type RawValue added in v0.2.4

type RawValue struct {
	Value       string
	Display     string
	Description string
}

func RawValuesFrom added in v0.2.4

func RawValuesFrom(values ...string) []RawValue

Jump to

Keyboard shortcuts

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